diff options
author | Zhao Heming <heming.zhao@suse.com> | 2020-09-27 13:40:13 +0800 |
---|---|---|
committer | Song Liu <songliubraving@fb.com> | 2020-10-08 22:37:39 -0700 |
commit | 1383b347a8ae4a69c04ae3746e6cb5c8d38e2585 (patch) | |
tree | fb317ba8ce53d83ed433af06609dada44bdc3809 /drivers/md/md-cluster.c | |
parent | cf0b9b4821a2955f8a23813ef8f422208ced9bd7 (diff) | |
download | linux-stable-1383b347a8ae4a69c04ae3746e6cb5c8d38e2585.tar.gz linux-stable-1383b347a8ae4a69c04ae3746e6cb5c8d38e2585.tar.bz2 linux-stable-1383b347a8ae4a69c04ae3746e6cb5c8d38e2585.zip |
md/bitmap: fix memory leak of temporary bitmap
Callers of get_bitmap_from_slot() are responsible to free the bitmap.
Suggested-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
Signed-off-by: Zhao Heming <heming.zhao@suse.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
Diffstat (limited to 'drivers/md/md-cluster.c')
-rw-r--r-- | drivers/md/md-cluster.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c index 0580b51a156a..4aaf4820b6f6 100644 --- a/drivers/md/md-cluster.c +++ b/drivers/md/md-cluster.c @@ -1166,6 +1166,7 @@ static int resize_bitmaps(struct mddev *mddev, sector_t newsize, sector_t oldsiz * can't resize bitmap */ goto out; + md_bitmap_free(bitmap); } return 0; |