[cppcheck] found a resource leak in os_dep.c

Martin Ettl ettl.martin@gmx.de
Sat Jan 16 12:22:00 GMT 2010


+++ This bug was initially created as a clone of Bug #42304 +++

Hi,

during check of the current trunk with the static code analysis tool cppcheck (https://sourceforge.net/projects/cppcheck/) i discovered a resource leak. Please see the attached patch that fixes the issue.

Best regards

Ettl Martin


Index: os_dep.c
===================================================================
--- os_dep.c	(Revision 155013)
+++ os_dep.c	(Arbeitskopie)
@@ -1165,6 +1165,7 @@
       } 
       GC_add_roots_inner(O32_BASE(seg), O32_BASE(seg)+O32_SIZE(seg), FALSE);
     }
+	fclose(myexefile);
 }
 
 # else /* !OS2 */
-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser



More information about the Gcc-patches mailing list