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: Mike Snitzer <snitzer@kernel.org>
This commit is contained in:
Родитель
b6bcb84446
Коммит
6827af4a9a
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче