From: Michael Snyder Date: Thu, 10 Mar 2011 20:09:18 +0000 (+0000) Subject: 2011-03-10 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b2c044529986cbce7edaba8d5998609e625c0f38;p=binutils-gdb.git 2011-03-10 Michael Snyder * gdbserver/server.c (handle_v_run): Free alloced buffer on early return. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 6d054a814da..e5ab2856b83 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2011-03-10 Michael Snyder + + * gdbserver/server.c (handle_v_run): Free alloced buffer on early + return. + 2011-03-10 Tom Tromey * tracepoint.c (trace_actions_command): Update. diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 8a19809d7ca..2f4484f71da 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; } }