[cppcheck] found a resource leak in trunk/cups/monitor/bcp.c

Ettl Martin ettl.martin at gmx.de
Sun Mar 14 11:20:50 PDT 2010


during a check of the current trunk with the static code analysis tool cppcheck (http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page), the tool discovered a resource leak in trunk/cups/monitor/bcp.c

Please refer the attached patch that fixes the issue.

Best regards

Ettl Martin

Here is the patch:

Index: bcp.c
===================================================================
--- bcp.c	(Revision 9039)
+++ bcp.c	(Arbeitskopie)
@@ -154,6 +154,8 @@
     fflush(stdout);
   }

+  fclose(fp);
+
   return (0);
 }





More information about the cups-devel mailing list