From f88c79e6bbf6108db9623c37134d756acb4fa7b3 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Wed, 1 Aug 2007 20:34:36 +0000 Subject: [PATCH] 2007-08-01 Michael Snyder * remote-utils.c (putpkt_binary): Memory leak, free buf2. --- gdb/gdbserver/ChangeLog | 4 ++++ gdb/gdbserver/remote-utils.c | 1 + 2 files changed, 5 insertions(+) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index cd12c4f03c9..eab0db2107e 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2007-08-01 Michael Snyder + + * remote-utils.c (putpkt_binary): Memory leak, free buf2. + 2007-07-31 Pedro Alves * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index 0e3acf4fd78..c02f941f4c9 100644 --- a/gdb/gdbserver/remote-utils.c +++ b/gdb/gdbserver/remote-utils.c @@ -549,6 +549,7 @@ putpkt_binary (char *buf, int cnt) if (write (remote_desc, buf2, p - buf2) != p - buf2) { perror ("putpkt(write)"); + free (buf2); return -1; } -- 2.30.2