From bb54fa3a0035e29aa97fc6638d71b8f57fe366e4 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Fri, 21 Dec 2018 20:31:10 +0000 Subject: vrrpd: fix memleak when sending advertisements Signed-off-by: Quentin Young --- vrrpd/vrrp.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vrrpd') diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c index 285071f1c..2eaf39fbb 100644 --- a/vrrpd/vrrp.c +++ b/vrrpd/vrrp.c @@ -266,6 +266,8 @@ static void vrrp_send_advertisement(struct vrrp_router *r) ssize_t sent = sendto(r->sock, pkt, (size_t)pktlen, 0, &dest.sa, sockunion_sizeof(&dest)); + XFREE(MTYPE_TMP, pkt); + if (sent < 0) { zlog_warn(VRRP_LOGPFX VRRP_LOGPFX_VRID "Failed to send VRRP Advertisement", -- cgit v1.2.3