From 899a22b840316d54a9563726e78f7a201a6702ef Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Wed, 9 Jul 2014 05:35:56 +0200 Subject: Static Code Analysis : fix various memory leaks. --- src/Mount/Mount.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/Mount') diff --git a/src/Mount/Mount.c b/src/Mount/Mount.c index eee282a8..3cf9b9a7 100644 --- a/src/Mount/Mount.c +++ b/src/Mount/Mount.c @@ -6566,7 +6566,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa void ExtractCommandLine (HWND hwndDlg, char *lpszCommandLine) { - char **lpszCommandLineArgs; /* Array of command line arguments */ + char **lpszCommandLineArgs = NULL; /* Array of command line arguments */ int nNoCommandLineArgs; /* The number of arguments in the array */ char tmpPath[MAX_PATH * 2]; @@ -6842,6 +6842,9 @@ void ExtractCommandLine (HWND hwndDlg, char *lpszCommandLine) { free (lpszCommandLineArgs[nNoCommandLineArgs]); } + + if (lpszCommandLineArgs) + free (lpszCommandLineArgs); } -- cgit v1.2.3