summaryrefslogtreecommitdiffstats
path: root/net/ceph/crush
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-05-08 00:37:05 +0200
committerSage Weil <sage@inktank.com>2012-05-08 00:39:36 +0200
commit6eb43f4b5a2a74599b4ff17a97c03a342327ca65 (patch)
tree1c9041c56c76aa2e975204ccac477a3a6a38a495 /net/ceph/crush
parentcrush: fix tree node weight lookup (diff)
downloadlinux-6eb43f4b5a2a74599b4ff17a97c03a342327ca65.tar.xz
linux-6eb43f4b5a2a74599b4ff17a97c03a342327ca65.zip
crush: fix memory leak when destroying tree buckets
Reflects ceph.git commit 46d63d98434b3bc9dad2fc9ab23cbaedc3bcb0e4. Reported-by: Alexander Lyakas <alex.bolshoy@gmail.com> Reviewed-by: Alex Elder <elder@inktank.com> Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'net/ceph/crush')
-rw-r--r--net/ceph/crush/crush.c2
1 files changed, 2 insertions, 0 deletions
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);
}