1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-10 15:48:06 -05:00

Uppity X forwarding: fix SockAddr use after free.

Another thing pointed out by ASan: new_unix_listener takes ownership
of the SockAddr you give it, so I shouldn't have been freeing it at
the end of platform_make_x11_server().
This commit is contained in:
Simon Tatham 2019-01-23 20:50:49 +00:00
parent e7edc6e7ba
commit 891c2b9616

View File

@ -201,8 +201,7 @@ int platform_make_x11_server(Plug *plug, const char *progname, int mindisp,
out:
if (a_tcp)
sk_addr_free(a_tcp);
if (a_unix)
sk_addr_free(a_unix);
/* a_unix doesn't need freeing, because new_unix_listener took it over */
sfree(authfilename);
strbuf_free(authfiledata);
sfree(unix_path);