diff options
author | Sri Mohana Singamsetty <srimohans@gmail.com> | 2019-10-17 07:22:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-17 07:22:05 +0200 |
commit | e75bbefa0e41995051d625aad3bfb5273ff3dc20 (patch) | |
tree | 1e5965ba475a334084bad8edb281ec8e02be840a /nhrpd/nhrpd.h | |
parent | Merge pull request #5176 from qlyoung/alpine-update-mpfr-dep (diff) | |
parent | nhrpd: be more careful with linked lists (diff) | |
download | frr-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.h | 6 |
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) |