From: Gregor Schneider Date: Sat, 29 May 2010 12:29:26 +0000 (+0000) Subject: [KERNEL32] WaitNamedPipeW: Free Unicode buffer when leaving the function X-Git-Tag: backups/header-work@57446~11^2~211 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=24dd4301ad8133e97f0ffaf6ec860cecad435134 [KERNEL32] WaitNamedPipeW: Free Unicode buffer when leaving the function svn path=/trunk/; revision=47406 --- diff --git a/reactos/dll/win32/kernel32/file/npipe.c b/reactos/dll/win32/kernel32/file/npipe.c index d62527e12a5..55aeed952fc 100644 --- a/reactos/dll/win32/kernel32/file/npipe.c +++ b/reactos/dll/win32/kernel32/file/npipe.c @@ -496,6 +496,7 @@ WaitNamedPipeW(LPCWSTR lpNamedPipeName, if (!NT_SUCCESS(Status)) { SetLastErrorByStatus(Status); + RtlFreeUnicodeString(&NamedPipeName); return FALSE; } @@ -538,9 +539,11 @@ WaitNamedPipeW(LPCWSTR lpNamedPipeName, if (!NT_SUCCESS(Status)) { SetLastErrorByStatus(Status); + RtlFreeUnicodeString(&NamedPipeName); return FALSE; } + RtlFreeUnicodeString(&NamedPipeName); return TRUE; } #endif