Author: paultcochrane
Date: Thu Oct 4 23:10:13 2007
New Revision: 21868
Modified:
trunk/src/pmc/parrotio.pmc
Log:
[pmc] An input argument to the open() method was freed just before it was
used. Thanks to Coverity (CID 131) for pointing this out!
Modified: trunk/src/pmc/parrotio.pmc
==============================================================================
--- trunk/src/pmc/parrotio.pmc (original)
+++ trunk/src/pmc/parrotio.pmc Thu Oct 4 23:10:13 2007
@@ -67,7 +67,6 @@
string_cstring_free(c_file);
string_cstring_free(c_mode);
- string_cstring_free(c_layer);
if (!pio || !PMC_struct_val(pio))
return pmc_new(INTERP, enum_class_Undef);
@@ -97,6 +96,8 @@
}
}
+ string_cstring_free(c_layer);
+
/* XXX leaks as in ops/io.ops: open */
return pio;
}