SMATCH: missing HeapFree's

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

 



Hello,

this was found by unfree-wine.pl, a slight modification of smatch's
unfree.pl
More to come, but now i'm tired.

License: LGPL, X11
Changelog:
	Michael Stefaniuc <mstefani@redhat.com>
	- add some missing HeapFree's and one missing free

bye
	michael
-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
System Administration           Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani@redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart
Index: dlls/psapi/psapi_main.c
===================================================================
RCS file: /home/wine/wine/dlls/psapi/psapi_main.c,v
retrieving revision 1.15
diff -u -r1.15 psapi_main.c
--- dlls/psapi/psapi_main.c	9 Jan 2003 00:02:26 -0000	1.15
+++ dlls/psapi/psapi_main.c	2 Apr 2003 23:17:44 -0000
@@ -330,6 +330,7 @@
             lpBaseName[nSize / 2 - 1] = 0;
     }
 
+    HeapFree(GetProcessHeap(), 0, ptr);
     return len;
 }
 
@@ -400,6 +401,7 @@
             lpFileName[nSize / 2 - 1] = 0;
     }
 
+    HeapFree(GetProcessHeap(), 0, ptr);
     return len;
 }
 
Index: dlls/cabinet/cabextract.c
===================================================================
RCS file: /home/wine/wine/dlls/cabinet/cabextract.c,v
retrieving revision 1.3
diff -u -r1.3 cabextract.c
--- dlls/cabinet/cabextract.c	23 Jan 2003 21:22:24 -0000	1.3
+++ dlls/cabinet/cabextract.c	2 Apr 2003 23:17:46 -0000
@@ -505,8 +505,10 @@
     file->attribs  = EndGetI16(buf+cffile_Attribs);
     file->filename = cabinet_read_string(cab);
 
-    if (!file->filename) 
+    if (!file->filename) {
+      free(file);
       return FALSE;
+    }
 
     if (!linkfile) 
       cab->files = file;
Index: dlls/dplayx/dplobby.c
===================================================================
RCS file: /home/wine/wine/dlls/dplayx/dplobby.c,v
retrieving revision 1.25
diff -u -r1.25 dplobby.c
--- dlls/dplayx/dplobby.c	12 Feb 2003 01:26:05 -0000	1.25
+++ dlls/dplayx/dplobby.c	2 Apr 2003 23:17:46 -0000
@@ -529,6 +529,7 @@
                                                0, lpConn, &dwConnSize );
   if( FAILED( hr ) )
   {
+    HeapFree( GetProcessHeap(), 0, lpConn );
     return hr;
   }
 
Index: dlls/kernel/console.c
===================================================================
RCS file: /home/wine/wine/dlls/kernel/console.c,v
retrieving revision 1.13
diff -u -r1.13 console.c
--- dlls/kernel/console.c	9 Jan 2003 06:01:32 -0000	1.13
+++ dlls/kernel/console.c	2 Apr 2003 23:17:47 -0000
@@ -749,6 +749,7 @@
         WideCharToMultiByte( GetConsoleOutputCP(), 0, ptr, ret + 1, title, size, NULL, NULL);
         ret = strlen(title);
     }
+    HeapFree(GetProcessHeap(), 0, ptr);
     return ret;
 }
 

Attachment: pgp00117.pgp
Description: PGP signature


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

  Powered by Linux