diff options
author | Mike Snitzer | 2023-04-04 11:59:00 -0400 |
---|---|---|
committer | Mike Snitzer | 2023-04-04 13:30:17 -0400 |
commit | 6827af4a9a9f5bb664c42abf7c11af4978d72201 (patch) | |
tree | 8a8a7eb1e56afab7d763bbe24f8c80e5608ec942 /drivers/md | |
parent | b6bcb84446810df0c9364ee6e23e07866316beaf (diff) |
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>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-clone-target.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm-clone-target.c b/drivers/md/dm-clone-target.c index f38a27604c7a..fc30ebd67622 100644 --- a/drivers/md/dm-clone-target.c +++ b/drivers/md/dm-clone-target.c @@ -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; } |