Commit b42f1625 authored by Andrew Nguyen's avatar Andrew Nguyen Committed by Alexandre Julliard

msvcrt: Fix a possible memory leak in _wsystem for the NULL command case.

Spotted with Valgrind.
parent 9361b619
...@@ -1169,6 +1169,7 @@ int CDECL _wsystem(const MSVCRT_wchar_t* cmd) ...@@ -1169,6 +1169,7 @@ int CDECL _wsystem(const MSVCRT_wchar_t* cmd)
*MSVCRT__errno() = MSVCRT_ENOENT; *MSVCRT__errno() = MSVCRT_ENOENT;
return 0; return 0;
} }
HeapFree(GetProcessHeap(), 0, comspec);
return 1; return 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment