Commit 6fb3b4f4 authored by Csaba Kertesz's avatar Csaba Kertesz

Fix a memory leak in CvNormalBayesClassifier::train()

parent d08b1636
......@@ -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++ )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment