]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4/fib_hash.c: fix NULL dereference
authorAdrian Bunk <bunk@kernel.org>
Wed, 20 Feb 2008 00:28:54 +0000 (16:28 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 20 Feb 2008 00:28:54 +0000 (16:28 -0800)
commit1dc7dc5b062b7267848c03095929121ac755dcf5
treedb9969ea8bf142e4c4a7621d0bc9382c42537686
parent2054a876ec41d25d43a12cd8e1056871a788a6e9
ipv4/fib_hash.c: fix NULL dereference

Unless I miss a guaranteed relation between between "f" and
"new_fa->fa_info" this patch is required for fixing a NULL dereference
introduced by commit c8c07589580924d82f22a0e053e947e2b654d66c ("[IPV4]
FIB_HASH: Reduce memory needs and speedup lookups") and spotted by the
Coverity checker.

Eric Dumazet says:

Hum, you are right, kmem_cache_free() doesnt allow a NULL
object, like kfree() does.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_hash.c