diff options
author | Michael Pavone <pavone@retrodev.com> | 2020-04-29 01:00:15 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2020-04-29 01:00:15 -0700 |
commit | 6641d3825bb931c5af37b98fc6420c972cfb3fd1 (patch) | |
tree | 762e5360b810c1db8adef4cbb0fb9eb21430e4e0 /gdb_remote.c | |
parent | aa51c95aadad282b7f2b8137730223afd9b0bf1e (diff) |
Fix addrinfo leak in GDB remote debug support
Diffstat (limited to 'gdb_remote.c')
-rw-r--r-- | gdb_remote.c | 1 |
1 files changed, 1 insertions, 0 deletions
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"); } |