Fix another giant batch of resource leaks. (Mostly memory, but there's
[u/mdw/putty] / telnet.c
index 3536414..6a56da7 100644 (file)
--- a/telnet.c
+++ b/telnet.c
@@ -662,6 +662,7 @@ static void telnet_log(Plug plug, int type, SockAddr addr, int port,
        msg = dupprintf("Failed to connect to %s: %s", addrbuf, error_msg);
 
     logevent(telnet->frontend, msg);
+    sfree(msg);
 }
 
 static int telnet_closing(Plug plug, const char *error_msg, int error_code,