diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2021-08-12 21:34:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-12 21:34:07 +0200 |
commit | a876da9b08efa0fcf6a311f8c58a60121b1da77f (patch) | |
tree | 45a5ccb2a9c481d44453b3feaac6b342e1ae79c6 /zebra | |
parent | Merge pull request #9304 from donaldsharp/zebra_random_stuff (diff) | |
parent | zebra: clean up nhg allocations in error path (diff) | |
download | frr-a876da9b08efa0fcf6a311f8c58a60121b1da77f.tar.xz frr-a876da9b08efa0fcf6a311f8c58a60121b1da77f.zip |
Merge pull request #9374 from mjstapp/fix_nhg_add_leak
zebra: clean up nhg allocations in error path
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/zapi_msg.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index f297bafaf..66208bfd8 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -1937,6 +1937,11 @@ static void zread_nhg_add(ZAPI_HANDLER_ARGS) flog_warn(EC_ZEBRA_NEXTHOP_CREATION_FAILED, "%s: Nexthop Group Creation failed", __func__); + + /* Free any local allocations */ + nexthop_group_delete(&nhg); + zebra_nhg_backup_free(&bnhg); + return; } |