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: MMI-PSA29.97-13-9~5974^2~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9c8043f337f14d1743006dfc59c03e80a42e3884;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.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 2b13117fb918..ba7edcdd09ce 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; }