From: Guoqing Jiang Date: Fri, 24 Feb 2017 03:15:12 +0000 (+0800) Subject: md-cluster: free md_cluster_info if node leave cluster X-Git-Tag: v5.15~11671^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c8043f337f14d1743006dfc59c03e80a42e3884;p=platform%2Fkernel%2Flinux-starfive.git md-cluster: free md_cluster_info if node leave cluster To avoid memory leak, we need to free the cinfo which is allocated when node join cluster. Reviewed-by: NeilBrown Signed-off-by: Guoqing Jiang Signed-off-by: Shaohua Li --- diff --git a/drivers/md/md-cluster.c b/drivers/md/md-cluster.c index 2b13117..ba7edcd 100644 --- a/drivers/md/md-cluster.c +++ b/drivers/md/md-cluster.c @@ -974,6 +974,7 @@ static int leave(struct mddev *mddev) lockres_free(cinfo->bitmap_lockres); unlock_all_bitmaps(mddev); dlm_release_lockspace(cinfo->lockspace, 2); + kfree(cinfo); return 0; }