diff --git a/modules/ml/src/data.cpp b/modules/ml/src/data.cpp index 8f2c7728c5..2a8368179e 100644 --- a/modules/ml/src/data.cpp +++ b/modules/ml/src/data.cpp @@ -92,7 +92,7 @@ void CvMLData::free_train_test_idx() { cvReleaseMat( &train_sample_idx ); cvReleaseMat( &test_sample_idx ); - sample_idx = 0; + cvFree(&sample_idx); } void CvMLData::clear()