Skip to content

Commit

Permalink
Fix memory error (forgotten reference counter increase when creating …
Browse files Browse the repository at this point in the history
…new labels)
  • Loading branch information
karlnapf committed May 7, 2018
1 parent 49e35df commit 2bb58b9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/shogun/classifier/svm/SVMLightOneClass.cpp
Expand Up @@ -88,6 +88,7 @@ bool CSVMLightOneClass::train_machine(CFeatures* data)

SG_UNREF(m_labels);
m_labels=new CBinaryLabels(num_vec);
SG_REF(m_labels);
((CBinaryLabels*) m_labels)->set_to_one();

// in case of LINADD enabled kernels cleanup!
Expand Down

0 comments on commit 2bb58b9

Please sign in to comment.