diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2014-07-09 05:35:56 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2014-11-08 23:20:43 +0100 |
commit | 899a22b840316d54a9563726e78f7a201a6702ef (patch) | |
tree | 9a3fe9f081b3b9554c29bc6b3cd6f3ae50def710 /src/Mount | |
parent | 5281e2d3b9adea8dff1730d78fe94af85582aea8 (diff) | |
download | VeraCrypt-899a22b840316d54a9563726e78f7a201a6702ef.tar.gz VeraCrypt-899a22b840316d54a9563726e78f7a201a6702ef.zip |
Static Code Analysis : fix various memory leaks.
Diffstat (limited to 'src/Mount')
-rw-r--r-- | src/Mount/Mount.c | 5 |
1 files changed, 4 insertions, 1 deletions
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);
}
|