From 03d6b119ca6ed6f8b3dbf48a3ed5d7baea6e49ba Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Wed, 16 Feb 2011 21:55:02 +0000 Subject: [PATCH] Applied fix #11520: resource leak git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@66918 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- utils/HelpGen/src/scriptbinder.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/HelpGen/src/scriptbinder.cpp b/utils/HelpGen/src/scriptbinder.cpp index 0fbc6d6b72..13c21ee142 100644 --- a/utils/HelpGen/src/scriptbinder.cpp +++ b/utils/HelpGen/src/scriptbinder.cpp @@ -593,7 +593,11 @@ bool DocGeneratorBase::SaveDocument( const char* fname, ScriptStream stm; // check if derived class agrees about saving it - if ( !OnSaveDocument( stm ) ) return 0; + if ( !OnSaveDocument( stm ) ) + { + fclose( fp ); + return 0; + } if ( pFromSection )