Skip to content

Commit

Permalink
fixed memory leak in ANN
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov committed Sep 1, 2015
1 parent 94cf543 commit dfb4909
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/ml/src/ann_mlp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ));
Expand Down

0 comments on commit dfb4909

Please sign in to comment.