diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2020-02-05 01:49:08 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-05 01:49:08 -0300 |
| commit | ecaeb3b697bfcd46fe4ee7a519fdebb69c7318f9 (patch) | |
| tree | d631ffc455be41355b1f6f763958a4cfbcf4a5d5 /lib/plist.c | |
| parent | 8f6ebcbeb2455855a0e9dd2946d48e8db23f7192 (diff) | |
| parent | e1b36e132b7eda2d230f2f95945e231df37a42f5 (diff) | |
Merge pull request #5750 from qlyoung/fix-null-after-xfree
*: don't null after XFREE; XFREE does this itself
Diffstat (limited to 'lib/plist.c')
| -rw-r--r-- | lib/plist.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/plist.c b/lib/plist.c index a0976cd6bd..f6ceba81e8 100644 --- a/lib/plist.c +++ b/lib/plist.c @@ -496,7 +496,6 @@ static void prefix_list_trie_del(struct prefix_list *plist, for (; depth > 0; depth--) if (trie_table_empty(*tables[depth])) { XFREE(MTYPE_PREFIX_LIST_TRIE, *tables[depth]); - *tables[depth] = NULL; } } @@ -1093,10 +1092,7 @@ static int vty_prefix_list_desc_unset(struct vty *vty, afi_t afi, return CMD_WARNING_CONFIG_FAILED; } - if (plist->desc) { - XFREE(MTYPE_TMP, plist->desc); - plist->desc = NULL; - } + XFREE(MTYPE_TMP, plist->desc); if (plist->head == NULL && plist->tail == NULL && plist->desc == NULL) prefix_list_delete(plist); |
