[PATCH] [Ntdll]: leaks

Eric Pouech eric.pouech at wanadoo.fr
Mon Oct 16 14:54:03 CDT 2006


- plug a memory leak

A+
---

 dlls/ntdll/directory.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index 29541af..45b38b8 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -1698,7 +1698,10 @@ NTSTATUS wine_nt_to_unix_file_name( cons
         {
             /* creation fails with STATUS_ACCESS_DENIED for the root of the drive */
             if (disposition == FILE_CREATE)
+            {
+                RtlFreeHeap( GetProcessHeap(), 0, unix_name );
                 return name_len ? STATUS_OBJECT_NAME_COLLISION : STATUS_ACCESS_DENIED;
+            }
             goto done;
         }
     }



More information about the wine-patches mailing list