2011-03-10 Michael Snyder <msnyder@vmware.com>

* gdbserver/server.c (handle_v_run): Free alloced buffer on early
	return.
This commit is contained in:
Michael Snyder 2011-03-10 20:09:18 +00:00
parent 197f0a605d
commit b2c0445299
2 changed files with 7 additions and 2 deletions

View File

@ -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.

View File

@ -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;
}
}