From f4a71275d42caba4a9cfc24d1a4240f380eecdc7 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 28 Jan 2021 14:07:53 -0500 Subject: [PATCH] TT#106101 mem leak fix for 554034eb7e Change-Id: I9c410211580d8513a203a29f898970a78175d08b --- daemon/udp_listener.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon/udp_listener.c b/daemon/udp_listener.c index 66f3e6572..6ce3ae377 100644 --- a/daemon/udp_listener.c +++ b/daemon/udp_listener.c @@ -44,7 +44,7 @@ static void udp_listener_incoming(int fd, void *p, uintptr_t x) { continue; if (errno != EWOULDBLOCK && errno != EAGAIN) ilog(LOG_WARNING, "Error reading from UDP socket"); - return; + break; } udp_buf->str.s[len] = '\0'; @@ -61,6 +61,8 @@ static void udp_listener_incoming(int fd, void *p, uintptr_t x) { udp_buf = NULL; } } + if (udp_buf) + obj_put(udp_buf); } static void __ulc_free(void *p) {