ipv4: Fix memory leak in exception case for splitting tries
authorAlexander Duyck <alexander.h.duyck@intel.com>
Tue, 15 Nov 2016 10:46:12 +0000 (05:46 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 10 Dec 2016 18:09:42 +0000 (19:09 +0100)
commitcd8a6c0e95bf59003c131f442e7eafded396627e
treec62c052dae21fffc93834ad5226ecf5dedb65f94
parenta8780378b39e43452e750fb4d7715b06abf9f032
ipv4: Fix memory leak in exception case for splitting tries

[ Upstream commit 3114cdfe66c156345b0ae34e2990472f277e0c1b ]

Fix a small memory leak that can occur where we leak a fib_alias in the
event of us not being able to insert it into the local table.

Fixes: 0ddcf43d5d4a0 ("ipv4: FIB Local/MAIN table collapse")
Reported-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ipv4/fib_trie.c