aboutsummaryrefslogtreecommitdiff
path: root/include/util.h
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-08-19 18:54:24 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2022-08-19 18:54:24 +0200
commitb5477cf2abdd76e22d227bd3959c7150251fafc0 (patch)
treea9cbcecb127aadeadecf20413703d3ce6d312e21 /include/util.h
parentce3a783daaa9b8f50d71cb3ac108e39002358a1e (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 'include/util.h')
0 files changed, 0 insertions, 0 deletions