aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-03-10 20:09:18 +0000
committerMichael Snyder <msnyder@vmware.com>2011-03-10 20:09:18 +0000
commitb2c044529986cbce7edaba8d5998609e625c0f38 (patch)
tree128452c98f2a3aa2b4a46a60c2594d62cf5163ca /gdb
parent197f0a605dde6bdc173692d9a8272940263ac108 (diff)
downloadgdb-b2c044529986cbce7edaba8d5998609e625c0f38.zip
gdb-b2c044529986cbce7edaba8d5998609e625c0f38.tar.gz
gdb-b2c044529986cbce7edaba8d5998609e625c0f38.tar.bz2
2011-03-10 Michael Snyder <msnyder@vmware.com>
* gdbserver/server.c (handle_v_run): Free alloced buffer on early return.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/gdbserver/server.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6d054a8..e5ab285 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2011-03-10 Michael Snyder <msnyder@vmware.com>
+
+ * gdbserver/server.c (handle_v_run): Free alloced buffer on early
+ return.
+
2011-03-10 Tom Tromey <tromey@redhat.com>
* tracepoint.c (trace_actions_command): Update.
diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index 8a19809..2f4484f 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -1949,16 +1949,16 @@ handle_v_run (char *own_buf)
if (program_argv == NULL)
{
- /* FIXME: new_argv memory leak */
write_enn (own_buf);
+ freeargv (new_argv);
return 0;
}
new_argv[0] = strdup (program_argv[0]);
if (new_argv[0] == NULL)
{
- /* FIXME: new_argv memory leak */
write_enn (own_buf);
+ freeargv (new_argv);
return 0;
}
}