Commit df241141 authored by Rémi Duraffort's avatar Rémi Duraffort Committed by Rémi Denis-Courmont

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

(cherry picked from commit 873c7e91207545aeaba931143c4e8d1de0640813)
Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>

Conflicts:
	modules/access/directory.c
parent 68cf50be
......@@ -283,8 +283,6 @@ block_t *DirBlock (access_t *p_access)
goto fatal;
block_t *block = block_heap_Alloc (footer, footer, len);
if (unlikely(block == NULL))
free (footer);
p_access->info.b_eof = true;
return block;
}
......@@ -436,10 +434,7 @@ notdir:
block_t *block = block_heap_Alloc (entry, 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