SMATCH: unfreed mem on error path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

found by the unfree-wine.pl smatch script

License: LGPL, X11
Changelog:
	Michael Stefaniuc <mstefani@xxxxxxxxxx>
	- fix mem leak on error path

bye
	michael
-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
System Administration           Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani@xxxxxxxxxx
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart
Index: dlls/wininet/urlcache.c
===================================================================
RCS file: /home/wine/wine/dlls/wininet/urlcache.c,v
retrieving revision 1.14
diff -u -r1.14 urlcache.c
--- dlls/wininet/urlcache.c	12 Dec 2003 06:01:20 -0000	1.14
+++ dlls/wininet/urlcache.c	16 Dec 2003 21:20:10 -0000
@@ -305,6 +305,8 @@
     if ((pContainer->hMutex = CreateMutexW(NULL, FALSE, mutex_name)) == NULL)
     {
         ERR("couldn't create mutex (error is %ld)\n", GetLastError());
+        HeapFree(GetProcessHeap(), 0, pContainer->path);
+        HeapFree(GetProcessHeap(), 0, pContainer);
         return FALSE;
     }
 

Attachment: pgp00200.pgp
Description: PGP signature


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux