Increase FONT_MAXNO from 0x2f to 0x40, to ensure the fonts[] array
[u/mdw/putty] / portfwd.c
index 70b8910..264198f 100644 (file)
--- a/portfwd.c
+++ b/portfwd.c
@@ -370,6 +370,7 @@ const char *pfd_newconnect(Socket *s, char *hostname, int port,
     addr = name_lookup(hostname, port, &dummy_realhost, conf, addressfamily);
     if ((err = sk_addr_error(addr)) != NULL) {
        sk_addr_free(addr);
+        sfree(dummy_realhost);
        return err;
     }
 
@@ -386,6 +387,7 @@ const char *pfd_newconnect(Socket *s, char *hostname, int port,
 
     pr->s = *s = new_connection(addr, dummy_realhost, port,
                                0, 1, 0, 0, (Plug) pr, conf);
+    sfree(dummy_realhost);
     if ((err = sk_socket_error(*s)) != NULL) {
        free_portfwd_private(pr);
        return err;