Commit 873c7e91 authored by Rémi Duraffort's avatar Rémi Duraffort

Fix potential double free (cid #1047496 and #1047497)

parent 1d5f0bf6
......@@ -299,8 +299,6 @@ block_t *DirBlock (access_t *p_access)
goto fatal;
block_t *block = block_heap_Alloc (footer, len);
if (unlikely(block == NULL))
free (footer);
p_access->info.b_eof = true;
return block;
}
......@@ -452,10 +450,7 @@ notdir:
block_t *block = block_heap_Alloc (entry, len);
if (unlikely(block == NULL))
{
free (entry);
goto fatal;
}
return block;
fatal:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment