diff options
author | Sam James <sam@gentoo.org> | 2022-03-31 08:27:42 +0100 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2022-05-08 14:56:26 -0500 |
commit | 7b2e8f9efd28566133b0da5ccf91b0e24a0d6c15 (patch) | |
tree | fbd03f747b1709cff63fa7edcdc557ec4f2a1c75 /src/librc/librc-depend.c | |
parent | 000a2c19b43afb60559cbf63b71446f6c908505a (diff) |
librc: mark rc_deptree_* functions as mallocs
(This is analogous to the rc_stringlist change.)
This gives a hint to the compiler that allocations (return values)
from this function should be paired with a corresponding dealloc/free
function.
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'src/librc/librc-depend.c')
-rw-r--r-- | src/librc/librc-depend.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/librc/librc-depend.c b/src/librc/librc-depend.c index e240cba0..4da81c03 100644 --- a/src/librc/librc-depend.c +++ b/src/librc/librc-depend.c @@ -76,6 +76,8 @@ rc_deptree_free(RC_DEPTREE *deptree) free(di); di = di2; } + + /* Use free() here since rc_deptree_free should not call itself */ free(deptree); } |