PR java/30454
* jcf-io.c (opendir_in_zip): Close the file
and free zipf before returning after an error.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121101
138bc75d-0d04-0410-961f-
82ee72b054a4
+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;