Merge branch '2775_segfault_on_incorrect_archive'

* 2775_segfault_on_incorrect_archive:
  Ticket #2775: segfault after open incorrect archive
This commit is contained in:
Slava Zanko 2012-04-12 22:53:05 +03:00
commit 4b457d8757
2 changed files with 3 additions and 1 deletions

View File

@ -257,6 +257,7 @@ cpio_open_cpio_file (struct vfs_class *me, struct vfs_s_super *super, const vfs_
message (D_ERROR, MSG_ERROR, _("Cannot open cpio archive\n%s"), s);
g_free (s);
g_free (super->name);
super->name = NULL;
return -1;
}
g_free (s);

View File

@ -325,6 +325,7 @@ tar_open_archive_int (struct vfs_class *me, const vfs_path_t * vpath, struct vfs
if (result == -1)
{
g_free (archive->name);
archive->name = NULL;
ERRNOR (ENOENT, -1);
}
}