kernel32: Fix a memory leak. Found by cross referencing Andrew Talbot's list of potential memory leaks with Smatch's view of the same problem.

Michael Stefaniuc mstefani at redhat.de
Thu Sep 20 16:49:29 CDT 2007


---
 dlls/kernel32/resource.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/kernel32/resource.c b/dlls/kernel32/resource.c
index d66f4ae..ff2ec95 100644
--- a/dlls/kernel32/resource.c
+++ b/dlls/kernel32/resource.c
@@ -1150,6 +1150,7 @@ static struct mapping_info *create_mapping( LPCWSTR name, BOOL rw )
     }
 
     unmap_file_from_memory( mi );
+    HeapFree( GetProcessHeap(), 0, mi );
 
     return NULL;
 }
-- 
1.5.3.rc7


-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
Sr. Network Engineer            Fax.: +49-711-96437-111
--------------------------------------------------------------------
Reg. Adresse: Red Hat GmbH, Hauptstätter Strasse 58, 70178 Stuttgart
Handelsregister: Amtsgericht Stuttgart HRB 153243
Geschäftsführer: Brendan Lane, Charlie Peters, Michael Cunningham,
                 Werner Knoblich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070920/392e72a0/attachment-0001.pgp 


More information about the wine-patches mailing list