summaryrefslogtreecommitdiffstats
path: root/lib/table.h
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2018-08-18 04:47:27 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2018-08-22 06:32:43 +0200
commit0e70e6c89d69976cde1b79bba6ac23d233b19566 (patch)
tree9f5def978893f3d421415fd6976676b7f38ed795 /lib/table.h
parent*: fix gcc-8 format-overflow warnings (diff)
downloadfrr-0e70e6c89d69976cde1b79bba6ac23d233b19566.tar.xz
frr-0e70e6c89d69976cde1b79bba6ac23d233b19566.zip
lib/bgpd: re-fix bgp_info_extra_free()
Make the wart slightly less bad... also there is still a possible write after free here. This needs to be fixed again, properly, by some structure changes. Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/table.h')
-rw-r--r--lib/table.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/table.h b/lib/table.h
index ac7df3e69..8304abe59 100644
--- a/lib/table.h
+++ b/lib/table.h
@@ -235,17 +235,13 @@ static inline struct route_node *route_lock_node(struct route_node *node)
}
/* Unlock node. */
-static inline struct route_node *route_unlock_node(struct route_node *node)
+static inline void route_unlock_node(struct route_node *node)
{
assert(node->lock > 0);
(*(unsigned *)&node->lock)--;
- if (node->lock == 0) {
+ if (node->lock == 0)
route_node_delete(node);
- return NULL;
- }
-
- return node;
}
/*