Fix a memory leak in CvNormalBayesClassifier::train()

pull/1483/head
Csaba Kertesz 11 years ago
parent d08b163657
commit 6fb3b4f41c
  1. 2
      modules/ml/src/nbayes.cpp

@ -210,6 +210,8 @@ bool CvNormalBayesClassifier::train( const CvMat* _train_data, const CvMat* _res
prod_data[c2] += train_vec[c2]*val1;
}
}
cvReleaseMat( &responses );
responses = 0;
/* calculate avg, covariance matrix, c */
for( cls = 0; cls < nclasses; cls++ )

Loading…
Cancel
Save