Skip to content

Commit

Permalink
remove free() in destructor (causing a double free)
Browse files Browse the repository at this point in the history
  • Loading branch information
Soeren Sonnenburg committed Aug 31, 2012
1 parent fc5a120 commit 2535f44
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/shogun/multiclass/KNN.cpp
Expand Up @@ -67,7 +67,6 @@ void CKNN::init()

CKNN::~CKNN()
{
SG_FREE(m_train_labels.vector);
}

bool CKNN::train_machine(CFeatures* data)
Expand Down Expand Up @@ -102,7 +101,7 @@ bool CKNN::train_machine(CFeatures* data)
m_min_label=min_class;
m_num_classes=max_class-min_class+1;

SG_INFO( "m_num_classes: %d (%+d to %+d) num_train: %d\n", m_num_classes,
SG_INFO("m_num_classes: %d (%+d to %+d) num_train: %d\n", m_num_classes,
min_class, max_class, m_train_labels.vlen);

return true;
Expand Down

0 comments on commit 2535f44

Please sign in to comment.