From: Donald Sharp Date: Mon, 4 Jun 2018 17:31:34 +0000 (-0400) Subject: zebra: Fix memory leak on host prefix removal X-Git-Tag: frr-6.1-dev~374^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=10ac25160c0d1211698b7b7a78b6d1505ac11c89;p=matthieu%2Ffrr.git zebra: Fix memory leak on host prefix removal When we have a host prefix, actually free the alloced memory associated with it when we free it. Signed-off-by: Donald Sharp --- diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index 90604215e7..74c1f3f178 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -3111,8 +3111,10 @@ static void rb_delete_host(struct host_rb_tree_entry *hrbe, struct prefix *host) memcpy(&lookup.p, host, sizeof(*host)); hle = RB_FIND(host_rb_tree_entry, hrbe, &lookup); - if (hle) + if (hle) { RB_REMOVE(host_rb_tree_entry, hrbe, hle); + XFREE(MTYPE_HOST_PREFIX, hle); + } return; }