From 02f3765351c9e25185b745b84f1a2604fb2149c7 Mon Sep 17 00:00:00 2001 From: mifi Date: Tue, 18 Dec 2007 21:20:28 +0000 Subject: - added patch for new flash functionality like: flash verify_image and flash erase_address. - added patch for new parport_write_on_exit command. Even this patch will fix some memory leaks. (thanks too oyvind and Spen for these patches) git-svn-id: svn://svn.berlios.de/openocd/trunk@240 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/server/telnet_server.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/server/telnet_server.c') diff --git a/src/server/telnet_server.c b/src/server/telnet_server.c index eeb2cc82..5353369a 100644 --- a/src/server/telnet_server.c +++ b/src/server/telnet_server.c @@ -506,21 +506,32 @@ int telnet_connection_closed(connection_t *connection) int i; if (t_con->prompt) + { free(t_con->prompt); + t_con->prompt = NULL; + } for (i = 0; i < TELNET_LINE_HISTORY_SIZE; i++) { if (t_con->history[i]) + { free(t_con->history[i]); + t_con->history[i] = NULL; + } } /* if this connection registered a debug-message receiver delete it */ delete_debug_msg_receiver(connection->cmd_ctx, NULL); if (connection->priv) + { free(connection->priv); + connection->priv = NULL; + } else + { ERROR("BUG: connection->priv == NULL"); + } target_unregister_event_callback(telnet_target_callback_event_handler, connection->cmd_ctx); -- cgit v1.2.3