]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix a memory leak in uxproxy.c.
authorSimon Tatham <anakin@pobox.com>
Sun, 22 Nov 2015 15:02:14 +0000 (15:02 +0000)
committerSimon Tatham <anakin@pobox.com>
Sun, 22 Nov 2015 15:11:00 +0000 (15:11 +0000)
We set up a pair of bufchains for the standard input and output
exchanged with the proxy process, but forgot to clear them when the
Local_Proxy_Socket is cleaned up.

unix/uxproxy.c

index 8c916dc99d7111eb8b898b4b14827555c048c0f5..be41487805ff38c04c2e32e514b44a48c99142e6 100644 (file)
@@ -104,6 +104,8 @@ static void sk_localproxy_close (Socket s)
     uxsel_del(ps->from_cmd);
     close(ps->from_cmd);
 
     uxsel_del(ps->from_cmd);
     close(ps->from_cmd);
 
+    bufchain_clear(&ps->pending_input_data);
+    bufchain_clear(&ps->pending_output_data);
     sfree(ps);
 }
 
     sfree(ps);
 }