mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
core(persistence): fix resource leaks - force closing files
backporting commit 673eb2b006
This commit is contained in:
@@ -251,10 +251,10 @@ void icvClose( CvFileStorage* fs, cv::String* out )
|
||||
else if ( fs->fmt == CV_STORAGE_FORMAT_JSON )
|
||||
icvPuts( fs, "}\n" );
|
||||
}
|
||||
|
||||
icvCloseFile(fs);
|
||||
}
|
||||
|
||||
icvCloseFile(fs);
|
||||
|
||||
if( fs->outbuf && out )
|
||||
{
|
||||
*out = cv::String(fs->outbuf->begin(), fs->outbuf->end());
|
||||
|
||||
Reference in New Issue
Block a user