[ros-diffs] [gschneider] 47406: [KERNEL32] WaitNamedPipeW: Free Unicode buffer when leaving the function

gschneider at svn.reactos.org gschneider at svn.reactos.org
Sat May 29 14:29:27 CEST 2010


Author: gschneider
Date: Sat May 29 14:29:26 2010
New Revision: 47406

URL: http://svn.reactos.org/svn/reactos?rev=47406&view=rev
Log:
[KERNEL32] WaitNamedPipeW: Free Unicode buffer when leaving the function

Modified:
    trunk/reactos/dll/win32/kernel32/file/npipe.c

Modified: trunk/reactos/dll/win32/kernel32/file/npipe.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/file/npipe.c?rev=47406&r1=47405&r2=47406&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/file/npipe.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/file/npipe.c [iso-8859-1] Sat May 29 14:29:26 2010
@@ -496,6 +496,7 @@
     if (!NT_SUCCESS(Status))
     {
         SetLastErrorByStatus(Status);
+        RtlFreeUnicodeString(&NamedPipeName);
         return FALSE;
     }
 
@@ -538,9 +539,11 @@
     if (!NT_SUCCESS(Status))
     {
         SetLastErrorByStatus(Status);
+        RtlFreeUnicodeString(&NamedPipeName);
         return FALSE;
     }
 
+    RtlFreeUnicodeString(&NamedPipeName);
     return TRUE;
 }
 #endif




More information about the Ros-diffs mailing list