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

Michael Sweet msweet at apple.com
Mon Mar 15 08:32:09 PDT 2010


Return from main() will close any open files.

On Mar 14, 2010, at 11:20 AM, Ettl Martin wrote:

> 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);
> }
> 
> _______________________________________________
> cups-bugs mailing list
> cups-bugs at easysw.com
> http://lists.easysw.com/mailman/listinfo/cups-bugs

________________________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair








More information about the cups-devel mailing list