]> git.saurik.com Git - wxWidgets.git/commitdiff
applied patch #928786: "Fix memory leak produced by ConvertArgsToUnicode()"
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Tue, 6 Apr 2004 17:18:20 +0000 (17:18 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Tue, 6 Apr 2004 17:18:20 +0000 (17:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/init.cpp

index e6d803cbe432f2354e59d41b763123ad6151a55d..407fe5cb3ecb8dd948057728342bfc25ba1a659b 100644 (file)
@@ -181,6 +181,7 @@ static void ConvertArgsToUnicode(int argc, char **argv)
         gs_initData.argv[i] = wxStrdup(wxConvLocal.cMB2WX(argv[i]));
     }
 
+    gs_initData.argc = argc;
     gs_initData.argv[argc] = NULL;
 }
 
@@ -195,6 +196,7 @@ static void FreeConvertedArgs()
 
         delete [] gs_initData.argv;
         gs_initData.argv = NULL;
+        gs_initData.argc = 0;
     }
 }