From b42f162563d0d0e9253f9891ffc04fee9852097c Mon Sep 17 00:00:00 2001 From: Andrew Nguyen Date: Sat, 15 Jan 2011 02:28:13 -0600 Subject: [PATCH] msvcrt: Fix a possible memory leak in _wsystem for the NULL command case. Spotted with Valgrind. --- dlls/msvcrt/process.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/msvcrt/process.c b/dlls/msvcrt/process.c index 349efeb4ffb..65518b8baaf 100644 --- a/dlls/msvcrt/process.c +++ b/dlls/msvcrt/process.c @@ -1169,6 +1169,7 @@ int CDECL _wsystem(const MSVCRT_wchar_t* cmd) *MSVCRT__errno() = MSVCRT_ENOENT; return 0; } + HeapFree(GetProcessHeap(), 0, comspec); return 1; }