libsemanage: Free contents of modkey in semanage_direct_remove
semanage_direct_remove allocates struct semanage_module_key_t on stack, then calls semanage_module_key_set_name which allocates modkey->name on heap, but modkey->name wasn't free()-d anywhere, creating a small leak. Signed-off-by: Jakub Hrozek <jhrozek@redhat.com>
This commit is contained in:
parent
af3e6789f0
commit
edae9275f6
1 changed files with 1 additions and 0 deletions
|
@ -1951,6 +1951,7 @@ static int semanage_direct_remove(semanage_handle_t * sh, char *module_name)
|
|||
status = semanage_direct_remove_key(sh, &modkey);
|
||||
|
||||
cleanup:
|
||||
semanage_module_key_destroy(sh, &modkey);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue