From: Sage Weil Date: Mon, 7 May 2012 22:37:05 +0000 (-0700) Subject: crush: fix memory leak when destroying tree buckets X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6eb43f4b5a2a74599b4ff17a97c03a342327ca65;p=linux-beck.git crush: fix memory leak when destroying tree buckets Reflects ceph.git commit 46d63d98434b3bc9dad2fc9ab23cbaedc3bcb0e4. Reported-by: Alexander Lyakas Reviewed-by: Alex Elder Signed-off-by: Sage Weil --- diff --git a/net/ceph/crush/crush.c b/net/ceph/crush/crush.c index b93575f4eb13..089613234f03 100644 --- a/net/ceph/crush/crush.c +++ b/net/ceph/crush/crush.c @@ -62,6 +62,8 @@ void crush_destroy_bucket_list(struct crush_bucket_list *b) void crush_destroy_bucket_tree(struct crush_bucket_tree *b) { + kfree(b->h.perm); + kfree(b->h.items); kfree(b->node_weights); kfree(b); }