Ondrej Mosnacek 6254bd3db3 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: stable@vger.kernel.org
Fixes: c7c556f1e81b ("selinux: refactor changing booleans")
Reported-by: Wander Lairson Costa <wander@redhat.com>
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
2022-05-17 18:34:35 -04:00
..
2022-03-10 16:51:51 -06:00
2020-11-06 08:08:37 -08:00
2022-03-24 13:13:26 -07:00
2022-03-23 18:23:13 -07:00
2022-03-24 16:19:43 -07:00
2022-03-31 11:43:01 -07:00
2022-03-21 20:47:54 -07:00