nhrpd: Fix memory leak in error path when forwarding packets

Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
This commit is contained in:
Reuben Dowle 2021-04-01 14:08:40 +13:00
parent d0c9d09aa9
commit ba113ac64e

View File

@ -1083,6 +1083,7 @@ static void nhrp_peer_forward(struct nhrp_peer *p,
err: err:
nhrp_packet_debug(pp->pkt, "FWD-FAIL"); nhrp_packet_debug(pp->pkt, "FWD-FAIL");
zbuf_free(zb); zbuf_free(zb);
zbuf_free(zb_copy);
} }
static void nhrp_packet_debug(struct zbuf *zb, const char *dir) static void nhrp_packet_debug(struct zbuf *zb, const char *dir)