summaryrefslogtreecommitdiffstats
path: root/nhrpd/nhrpd.h
diff options
context:
space:
mode:
authorSri Mohana Singamsetty <srimohans@gmail.com>2019-10-17 07:22:05 +0200
committerGitHub <noreply@github.com>2019-10-17 07:22:05 +0200
commite75bbefa0e41995051d625aad3bfb5273ff3dc20 (patch)
tree1e5965ba475a334084bad8edb281ec8e02be840a /nhrpd/nhrpd.h
parentMerge pull request #5176 from qlyoung/alpine-update-mpfr-dep (diff)
parentnhrpd: be more careful with linked lists (diff)
downloadfrr-e75bbefa0e41995051d625aad3bfb5273ff3dc20.tar.xz
frr-e75bbefa0e41995051d625aad3bfb5273ff3dc20.zip
Merge pull request #5167 from mjstapp/test_nhrp_list_sa
nhrpd: be more careful in linkedlist macro
Diffstat (limited to 'nhrpd/nhrpd.h')
-rw-r--r--nhrpd/nhrpd.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/nhrpd/nhrpd.h b/nhrpd/nhrpd.h
index 50746d9ad..ad38cad83 100644
--- a/nhrpd/nhrpd.h
+++ b/nhrpd/nhrpd.h
@@ -76,8 +76,10 @@ static inline void notifier_del(struct notifier_block *n)
static inline void notifier_call(struct notifier_list *l, int cmd)
{
struct notifier_block *n, *nn;
- list_for_each_entry_safe(n, nn, &l->notifier_head, notifier_entry)
- n->action(n, cmd);
+ list_for_each_entry_safe(n, nn, &l->notifier_head, notifier_entry) {
+ if (n)
+ n->action(n, cmd);
+ }
}
static inline int notifier_active(struct notifier_list *l)