diff --git a/reactos/base/shell/explorer/services/startup.c b/reactos/base/shell/explorer/services/startup.c index 207b4a0a21c..6176be67f51 100644 --- a/reactos/base/shell/explorer/services/startup.c +++ b/reactos/base/shell/explorer/services/startup.c @@ -349,6 +349,7 @@ static BOOL ProcessRunKeys(HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete, { printf("Couldn't allocate memory for the value names\n"); + free(szCmdLine); res=ERROR_NOT_ENOUGH_MEMORY; goto end; } @@ -388,6 +389,7 @@ static BOOL ProcessRunKeys(HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete, printf("Done processing cmd #%ld\n", i); } + free(szValue); res=ERROR_SUCCESS; end: