dm era: Fix bitset memory leaks
authorNikos Tsironis <ntsironis@arrikto.com>
Fri, 22 Jan 2021 15:25:54 +0000 (17:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Mar 2021 17:22:56 +0000 (18:22 +0100)
commit3a632be9015443b9ee12dd7c3066d076ee9cdb7d
tree4f3b1981d248d2acc16bdc21c13b4d8a9a18933c
parented2b54f8093039f2c772463e48bffb4f290f4e35
dm era: Fix bitset memory leaks

commit 904e6b266619c2da5c58b5dce14ae30629e39645 upstream.

Deallocate the memory allocated for the in-core bitsets when destroying
the target and in error paths.

Fixes: eec40579d84873 ("dm: add era target")
Cc: stable@vger.kernel.org # v3.15+
Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Reviewed-by: Ming-Hung Tsai <mtsai@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-era-target.c