diff options
| author | Lou Berger <lberger@labn.net> | 2018-07-27 12:45:08 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-07-27 12:45:08 -0400 |
| commit | 729fa7048bf25b09217af556e8cd56b619cb6afc (patch) | |
| tree | a29998ce0c511fafb9190fe19c4790c31e25c3c8 /lib/table.h | |
| parent | 298de6ef18404624b0771411b3f1e1aa9cd951cf (diff) | |
| parent | 239b37bb3c1d1d82423c5934c8615d4bfb392472 (diff) | |
Merge pull request #2743 from donaldsharp/bgp_null_stuff
Put back some removed Code
Diffstat (limited to 'lib/table.h')
| -rw-r--r-- | lib/table.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/table.h b/lib/table.h index a9d788b35a..f58a6025e2 100644 --- a/lib/table.h +++ b/lib/table.h @@ -233,13 +233,17 @@ static inline struct route_node *route_lock_node(struct route_node *node) } /* Unlock node. */ -static inline void route_unlock_node(struct route_node *node) +static inline struct route_node *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; } /* |
