2007-01-23 Andrew Pinski <pinskia@gmail.com>
PR java/30454
* jcf-io.c (opendir_in_zip): Close the file
and free zipf before returning after an error.
From-SVN: r121101
+2007-01-23 Andrew Pinski <pinskia@gmail.com>
+
+ PR java/30454
+ * jcf-io.c (opendir_in_zip): Close the file
+ and free zipf before returning after an error.
+
2007-01-16 Tom Tromey <tromey@redhat.com>
* java-tree.def: Added copyright header.
{
jcf_dependency_add_file (zipfile, is_system);
if (read (fd, magic, 4) != 4 || GET_u4 (magic) != (JCF_u4)ZIPMAGIC)
- return NULL;
+ {
+ free (zipf);
+ close (fd);
+ return NULL;
+ }
lseek (fd, 0L, SEEK_SET);
if (read_zip_archive (zipf) != 0)
- return NULL;
+ {
+ free (zipf);
+ close (fd);
+ return NULL;
+ }
}
SeenZipFiles = zipf;