1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-12 03:18:26 -06:00

Static Code Analysis : fix various memory leaks.

This commit is contained in:
Mounir IDRASSI
2014-07-09 05:35:56 +02:00
parent 5281e2d3b9
commit 899a22b840
4 changed files with 16 additions and 4 deletions

View File

@@ -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);
}