Commit 6827af4a authored by Mike Snitzer's avatar Mike Snitzer

dm clone: call kmem_cache_destroy() in dm_clone_init() error path

Otherwise the _hydration_cache will leak if dm_register_target() fails.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
parent b6bcb844
......@@ -2205,6 +2205,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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment