From 6641d3825bb931c5af37b98fc6420c972cfb3fd1 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Wed, 29 Apr 2020 01:00:15 -0700 Subject: Fix addrinfo leak in GDB remote debug support --- gdb_remote.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gdb_remote.c b/gdb_remote.c index 92fdfcf..001fe47 100644 --- a/gdb_remote.c +++ b/gdb_remote.c @@ -588,6 +588,7 @@ void gdb_remote_init(void) if (bind(listen_sock, result->ai_addr, result->ai_addrlen) < 0) { fatal_error("Failed to bind GDB remote debugging socket"); } + freeaddrinfo(result); if (listen(listen_sock, 1) < 0) { fatal_error("Failed to listen on GDB remote debugging socket"); } -- cgit v1.2.3