diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2022-08-19 18:54:24 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2022-08-19 18:59:52 +0200 |
commit | ee92da3498723edb0049ed76479392da179ec5b9 (patch) | |
tree | 6796afdb379ced2774c3a773d96cf192405328f0 /lib/sqfs/comp/create_block.c | |
parent | a9536fe9d0d2a01bf2b168e742736b014723c99b (diff) |
Fix: libfstree: double free in error path
If fstree_mknode fails, because the parent link count would overflow,
the function fails and cleans up behind it. The problem arises because
the function does this check *after* inserting the node in the parent
node, so it is later free'd again, when destroying the rest of the
tree.
This patch moves the insertion after the check to mitigate the problem.
Reported-by: Marvin Renich <mrvn@renich.org>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/comp/create_block.c')
0 files changed, 0 insertions, 0 deletions