mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-27 00:12:05 +00:00
2dc6406a30
When list_prepend() returns an error, it always means it failed to allocate some memory and does not hold any reference to its argument data. This argument needs to be freed by the caller in order to prevent a memory leak. While reviewing list_prepend() callers, I spend quite some time understanding why typealiases_gather_map() does not need to strdup(key) or free(key) when calling list_prepend(..., key) even though "key" comes from pdb->p_types.table: because typealias_list_destroy() does not free the inserted items. Add a comment to make this clearer in the code. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org> |
||
---|---|---|
.. | ||
cil | ||
include | ||
man | ||
src | ||
tests | ||
utils | ||
.gitignore | ||
COPYING | ||
Makefile | ||
VERSION |