fixed memory leak in ANN

(cherry picked from commit dfb49097e3)
This commit is contained in:
Ilya Lavrenov 2015-09-01 12:29:52 +03:00 committed by Alexander Smorkalov
parent b5e42d8cc1
commit ac33cd688c

View File

@ -1535,6 +1535,10 @@ void CvANN_MLP::read( CvFileStorage* fs, CvFileNode* node )
_layer_sizes = (CvMat*)cvReadByName( fs, node, "layer_sizes" );
CV_CALL( create( _layer_sizes, SIGMOID_SYM, 0, 0 ));
cvReleaseMat( &_layer_sizes );
_layer_sizes = NULL;
l_count = layer_sizes->cols;
CV_CALL( read_params( fs, node ));