mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-26 12:30:23 +09:00
dm clone: call kmem_cache_destroy() in dm_clone_init() error path
commit 6827af4a9a upstream.
Otherwise the _hydration_cache will leak if dm_register_target() fails.
Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f382705d04
commit
56e952ae6d
@@ -2214,6 +2214,7 @@ static int __init dm_clone_init(void)
|
||||
r = dm_register_target(&clone_target);
|
||||
if (r < 0) {
|
||||
DMERR("Failed to register clone target");
|
||||
kmem_cache_destroy(_hydration_cache);
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user