mirror of
https://github.com/linux-msm/openocd.git
synced 2026-02-25 13:15:07 -08:00
gdbserver: fix gdb_port memory leak
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
This commit is contained in:
@@ -2466,8 +2466,10 @@ COMMAND_HANDLER(handle_gdb_sync_command)
|
||||
COMMAND_HANDLER(handle_gdb_port_command)
|
||||
{
|
||||
int retval = CALL_COMMAND_HANDLER(server_pipe_command, &gdb_port);
|
||||
if (ERROR_OK == retval)
|
||||
if (ERROR_OK == retval) {
|
||||
free((void*)gdb_port_next);
|
||||
gdb_port_next = strdup(gdb_port);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user