diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2017-02-24 04:15:12 +0100 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2017-03-09 18:01:47 +0100 |
commit | 9c8043f337f14d1743006dfc59c03e80a42e3884 (patch) | |
tree | 1934109184f04fc891ed6ce6bea30fdde3ef85d4 | |
parent | md: delete dead code (diff) | |
download | linux-9c8043f337f14d1743006dfc59c03e80a42e3884.tar.xz linux-9c8043f337f14d1743006dfc59c03e80a42e3884.zip |
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 <neilb@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
-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 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; } |