diff options
author | Chris Hall <chris.hall@highwayman.com> | 2010-12-21 11:47:55 +0000 |
---|---|---|
committer | Chris Hall <chris.hall@highwayman.com> | 2010-12-21 11:47:55 +0000 |
commit | 5cffb8de373bbd19c9db36239cf41951e266953e (patch) | |
tree | 42318e7979acc96376cd1c4fe8ffd3dbcdd413ce /lib | |
parent | d475a0f198f880595eb27e44008e5de3aad25d73 (diff) | |
download | quagga-ex09.tar.bz2 quagga-ex09.tar.xz |
ex09: Fix "no ip community-list"ex09
"no ip community-list" leaves a named list with NULL value, and
some operations did not check for that NULL value.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/plist.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/plist.c b/lib/plist.c index b2163e2b..e5c71d35 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -1609,8 +1609,13 @@ vty_clear_prefix_list (struct vty *vty, afi_t afi, const char *name, struct symbol_walker walker ; symbol_walk_start(&pm->table, &walker) ; while ((plist = symbol_get_value(symbol_walk_next(&walker)))) - for (VECTOR_ITEMS(&plist->list, pe, i)) - pe->hitcnt = 0 ; + { + if (plist == NULL) + continue ; + + for (VECTOR_ITEMS(&plist->list, pe, i)) + pe->hitcnt = 0 ; + } ; } else { |