Merge pull request #5842 from qlyoung/fix-test-then-xfree-again

lib: do not test before XFREE
This commit is contained in:
Donatas Abraitis 2020-02-20 14:40:02 +02:00 committed by GitHub
commit f294fac22d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -243,9 +243,7 @@ static int lib_route_map_entry_description_destroy(enum nb_event event,
break;
case NB_EV_APPLY:
rmi = nb_running_get_entry(dnode, NULL, true);
if (rmi->description != NULL)
XFREE(MTYPE_TMP, rmi->description);
rmi->description = NULL;
XFREE(MTYPE_TMP, rmi->description);
break;
}