diff --git a/dlls/kernel32/sync.c b/dlls/kernel32/sync.c index 96302585732..7d5d45c9f0f 100644 --- a/dlls/kernel32/sync.c +++ b/dlls/kernel32/sync.c @@ -1529,6 +1529,8 @@ BOOL WINAPI WaitNamedPipeW (LPCWSTR name, DWORD nTimeOut) FILE_SYNCHRONOUS_IO_NONALERT); if (status != ERROR_SUCCESS) { + HeapFree( GetProcessHeap(), 0, pipe_wait); + RtlFreeUnicodeString( &nt_name ); SetLastError( ERROR_PATH_NOT_FOUND ); return FALSE; }