mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
Merge branch '2775_segfault_on_incorrect_archive'
* 2775_segfault_on_incorrect_archive: Ticket #2775: segfault after open incorrect archive
This commit is contained in:
commit
4b457d8757
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user