Merge branch '4616_tar_double_free'

* 4616_tar_double_free:
  Ticket #4616: (tar_read_header): fix double free.
This commit is contained in:
Andrew Borodin 2024-12-21 19:09:31 +03:00
commit 0df9c46cd1

View File

@ -680,7 +680,6 @@ tar_read_header (struct vfs_class *me, struct vfs_s_super *archive)
data_block = tar_find_next_block (arch); data_block = tar_find_next_block (arch);
if (data_block == NULL) if (data_block == NULL)
{ {
g_free (header_copy);
message (D_ERROR, MSG_ERROR, _("Unexpected EOF on archive file")); message (D_ERROR, MSG_ERROR, _("Unexpected EOF on archive file"));
status = HEADER_FAILURE; status = HEADER_FAILURE;
goto ret; goto ret;