fixed memory leak in ml module
authorIlya Lavrenov <ilya.lavrenov@itseez.com>
Tue, 1 Sep 2015 08:26:25 +0000 (11:26 +0300)
committerAlexander Smorkalov <alexander.smorkalov@itseez.com>
Thu, 17 Sep 2015 10:40:02 +0000 (13:40 +0300)
(cherry picked from commit d7bb1025f32ed268da7230cae3e8cb413dbab282)

modules/ml/src/ertrees.cpp

index d911834..fe3e04c 100644 (file)
@@ -537,6 +537,9 @@ void CvERTreeTrainData::set_data( const CvMat* _train_data, int _tflag,
     if( data )
         delete data;
 
+    if ( pair16u32s_ptr )
+        cvFree( &pair16u32s_ptr );
+
     if (_fdst)
         cvFree( &_fdst );
     if (_idst)