]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
crush: fix memory leak when destroying tree buckets
authorSage Weil <sage@inktank.com>
Mon, 7 May 2012 22:37:05 +0000 (15:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Nov 2012 19:38:03 +0000 (11:38 -0800)
(cherry picked from commit 6eb43f4b5a2a74599b4ff17a97c03a342327ca65)

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ceph/crush/crush.c

index f23611d0cdee437e8ff42ae01d765b5a7167ae1b..fbda0521a006b38d1b9c827d1b005e8aa75be175 100644 (file)
@@ -85,6 +85,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);
 }