[svn:parrot] r40318 - trunk/src

chromatic at svn.parrot.org chromatic at svn.parrot.org
Tue Jul 28 23:44:50 UTC 2009


Author: chromatic
Date: Tue Jul 28 23:44:46 2009
New Revision: 40318
URL: https://trac.parrot.org/parrot/changeset/40318

Log:
[src] Added an fclose() to the IO error branch in Parrot_pbc_read() -- no point
in leaking a filehandle if there's an error condition.  (Coverity CID #360).

Modified:
   trunk/src/embed.c

Modified: trunk/src/embed.c
==============================================================================
--- trunk/src/embed.c	Tue Jul 28 23:10:08 2009	(r40317)
+++ trunk/src/embed.c	Tue Jul 28 23:44:46 2009	(r40318)
@@ -482,6 +482,7 @@
             Parrot_io_eprintf(interp,
              "Parrot VM: Problem reading packfile from PIO:  code %d.\n",
                         ferror(io));
+            fclose(io);
             mem_sys_free(program_code);
             return NULL;
         }


More information about the parrot-commits mailing list