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) ...@@ -299,8 +299,6 @@ block_t *DirBlock (access_t *p_access)
goto fatal; goto fatal;
block_t *block = block_heap_Alloc (footer, len); block_t *block = block_heap_Alloc (footer, len);
if (unlikely(block == NULL))
free (footer);
p_access->info.b_eof = true; p_access->info.b_eof = true;
return block; return block;
} }
...@@ -452,10 +450,7 @@ notdir: ...@@ -452,10 +450,7 @@ notdir:
block_t *block = block_heap_Alloc (entry, len); block_t *block = block_heap_Alloc (entry, len);
if (unlikely(block == NULL)) if (unlikely(block == NULL))
{
free (entry);
goto fatal; goto fatal;
}
return block; return block;
fatal: 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