server: free strduped port numbers
Although the leak is negligible, the clean heap on exit will ease valgrind testing. Change-Id: I3a7a9c8e8dc7557aa51d0b9caa244537e5e7007d Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/4410 Tested-by: jenkins
This commit is contained in:
@@ -3572,3 +3572,9 @@ int gdb_register_commands(struct command_context *cmd_ctx)
|
||||
gdb_port_next = strdup("3333");
|
||||
return register_commands(cmd_ctx, NULL, gdb_command_handlers);
|
||||
}
|
||||
|
||||
void gdb_service_free(void)
|
||||
{
|
||||
free(gdb_port);
|
||||
free(gdb_port_next);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user