From ecd9a442b8789d8d66da74841de6addec53057e9 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 22 May 2014 10:43:39 +1000 Subject: [PATCH] lib-btreec-fix-leak-of-whole-btree-nodes-fix remove unneeded test of NULL Cc: Joern Engel Cc: Johannes Berg Cc: Minfei Huang Signed-off-by: Andrew Morton --- lib/btree.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/btree.c b/lib/btree.c index 725bf8b4f6c2..4264871ea1a0 100644 --- a/lib/btree.c +++ b/lib/btree.c @@ -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; } -- 2.39.5