From e8aca32f312cbef1cb0b0dd9e87b7e59dc9fa251 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 27 Nov 2012 01:10:30 +0000 Subject: isisd: address Coverity warnings this fixes a bunch of issues found by Coverity SCAN and flagged as "high" impact -- although, they're all rather minute issues. * isisd/isis_adjacency.c: one superfluous check, one possible NULL deref * isisd/isis_circuit.c: two prefix memory leaks * isisd/isis_csm.c: one missing break * isisd/isis_lsp.c: one possible NULL deref * isisd/isis_pfpacket.c: one error-case fd leak * isisd/isis_route.c: one isis_route_info memory leak * isisd/isis_routemap.c: one... fnord * isisd/isis_tlv.c: one infinite loop Reported-by: Coverity SCAN Signed-off-by: David Lamparter --- isisd/isis_route.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'isisd/isis_route.c') diff --git a/isisd/isis_route.c b/isisd/isis_route.c index c99d9583..8ab470ce 100644 --- a/isisd/isis_route.c +++ b/isisd/isis_route.c @@ -438,7 +438,11 @@ isis_route_create (struct prefix *prefix, u_int32_t cost, u_int32_t depth, route_node = route_node_get (area->route_table6[level - 1], prefix); #endif /* HAVE_IPV6 */ else - return NULL; + { + isis_route_info_delete (rinfo_new); + return NULL; + } + rinfo_old = route_node->info; if (!rinfo_old) { -- cgit v1.2.1