diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-02-25 21:18:13 +0100 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-02-26 00:00:46 +0100 |
commit | 0a22ddfbb16a61c3e068ea1164e885104366112a (patch) | |
tree | 5aeaef43b3de5ebbdfcf1015421eb48b51a071fb /ripd/rip_northbound.c | |
parent | lib: STAILQ_FOREACH_SAFE never gives a null elem (diff) | |
download | frr-0a22ddfbb16a61c3e068ea1164e885104366112a.tar.xz frr-0a22ddfbb16a61c3e068ea1164e885104366112a.zip |
*: remove null check before XFREE
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'ripd/rip_northbound.c')
-rw-r--r-- | ripd/rip_northbound.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/ripd/rip_northbound.c b/ripd/rip_northbound.c index 1e5f86eff..f3b5dc2dc 100644 --- a/ripd/rip_northbound.c +++ b/ripd/rip_northbound.c @@ -937,8 +937,7 @@ lib_interface_rip_authentication_password_modify(enum nb_event event, ifp = yang_dnode_get_entry(dnode, true); ri = ifp->info; - if (ri->auth_str) - XFREE(MTYPE_RIP_INTERFACE_STRING, ri->auth_str); + XFREE(MTYPE_RIP_INTERFACE_STRING, ri->auth_str); ri->auth_str = XSTRDUP(MTYPE_RIP_INTERFACE_STRING, yang_dnode_get_string(dnode, NULL)); @@ -978,8 +977,7 @@ lib_interface_rip_authentication_key_chain_modify(enum nb_event event, ifp = yang_dnode_get_entry(dnode, true); ri = ifp->info; - if (ri->key_chain) - XFREE(MTYPE_RIP_INTERFACE_STRING, ri->key_chain); + XFREE(MTYPE_RIP_INTERFACE_STRING, ri->key_chain); ri->key_chain = XSTRDUP(MTYPE_RIP_INTERFACE_STRING, yang_dnode_get_string(dnode, NULL)); |