Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
selinux: fix bad cleanup on error in hashtab_duplicate()
The code attempts to free the 'new' pointer using kmem_cache_free(), which is wrong because this function isn't responsible of freeing it. Instead, the function should free new->htable and clear the contents of *new (to prevent double-free). Cc: [email protected] Fixes: c7c556f ("selinux: refactor changing booleans") Reported-by: Wander Lairson Costa <[email protected]> Signed-off-by: Ondrej Mosnacek <[email protected]> Signed-off-by: Paul Moore <[email protected]>
- Loading branch information