mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-23 14:32:08 +00:00
libsepol: fix memory leak in sepol_bool_query()
When sepol_bool_query() returns NULL response, variable name is not freed. Fix this by calling free() before returning. Signed-off-by: Jan Zarsky <jzarsky@redhat.com>
This commit is contained in:
parent
7e9d1344db
commit
77059c39e8
@ -155,6 +155,7 @@ int sepol_bool_query(sepol_handle_t * handle,
|
||||
booldatum = hashtab_search(policydb->p_bools.table, name);
|
||||
if (!booldatum) {
|
||||
*response = NULL;
|
||||
free(name);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user