mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-21 21:15:03 -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:
parent
e7edc6e7ba
commit
891c2b9616
@ -201,8 +201,7 @@ int platform_make_x11_server(Plug *plug, const char *progname, int mindisp,
|
|||||||
out:
|
out:
|
||||||
if (a_tcp)
|
if (a_tcp)
|
||||||
sk_addr_free(a_tcp);
|
sk_addr_free(a_tcp);
|
||||||
if (a_unix)
|
/* a_unix doesn't need freeing, because new_unix_listener took it over */
|
||||||
sk_addr_free(a_unix);
|
|
||||||
sfree(authfilename);
|
sfree(authfilename);
|
||||||
strbuf_free(authfiledata);
|
strbuf_free(authfiledata);
|
||||||
sfree(unix_path);
|
sfree(unix_path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user