]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
lib-btreec-fix-leak-of-whole-btree-nodes-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 14 May 2014 00:02:31 +0000 (10:02 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 14 May 2014 00:02:31 +0000 (10:02 +1000)
remove unneeded test of NULL

Cc: Joern Engel <joern@logfs.org>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Minfei Huang <huangminfei@ucloud.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/btree.c

index 725bf8b4f6c23a885506e84be458a151d5b09f36..4264871ea1a00194750116a82c48e18d18edbd44 100644 (file)
@@ -198,8 +198,7 @@ EXPORT_SYMBOL_GPL(btree_init);
 
 void btree_destroy(struct btree_head *head)
 {
-       if (head->node)
-               mempool_free(head->node, head->mempool);
+       mempool_free(head->node, head->mempool);
        mempool_destroy(head->mempool);
        head->mempool = NULL;
 }