mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 06:50:17 +00:00
lib: make rcu_free() NULL-safe
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
420dcec358
commit
9fe602a17c
@ -139,6 +139,8 @@ extern void rcu_enqueue(struct rcu_head *head, const struct rcu_action *action);
|
||||
#define rcu_free(mtype, ptr, field) \
|
||||
do { \
|
||||
typeof(ptr) _ptr = (ptr); \
|
||||
if (!_ptr) \
|
||||
break; \
|
||||
struct rcu_head *_rcu_head = &_ptr->field; \
|
||||
static const struct rcu_action _rcu_action = { \
|
||||
.type = RCUA_FREE, \
|
||||
|
Loading…
Reference in New Issue
Block a user