missing call to fclose

Michal Seben mseben at suse.cz
Mon Oct 19 10:25:34 EDT 2009


We've received the following report from a reporter:
https://bugzilla.novell.com/show_bug.cgi?id=542802

----------------------
source code file argus-3.0.0/argus/argus.c
function ArgusParseResourceFile.

I notice the following code

     if ((fd = fopen (file, "r")) != NULL) {

but I fail to notice a matching call to fclose.  This looks like a
resource leak to me. Suggest fclose the file near the end of the function.
----------------------

thanks




More information about the argus mailing list