~mdw
/
sgt
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add some more precautionary assertions, just in case anything wildly
[sgt/putty]
/
x11fwd.c
diff --git
a/x11fwd.c
b/x11fwd.c
index
1e04f54
..
895d8a9
100644
(file)
--- a/
x11fwd.c
+++ b/
x11fwd.c
@@
-171,6
+171,7
@@
struct X11Display *x11_setup_display(char *display, int authtype, Conf *conf)
sk_addr_free(disp->addr);
sfree(disp->hostname);
sfree(disp->unixsocketpath);
sk_addr_free(disp->addr);
sfree(disp->hostname);
sfree(disp->unixsocketpath);
+ sfree(disp);
return NULL; /* FIXME: report an error */
}
}
return NULL; /* FIXME: report an error */
}
}
@@
-343,7
+344,7
@@
void x11_get_auth_from_authfile(struct X11Display *disp,
int len[4];
int family, protocol;
int ideal_match = FALSE;
int len[4];
int family, protocol;
int ideal_match = FALSE;
- char *ourhostname
= get_hostname()
;
+ char *ourhostname;
/*
* Normally we should look for precisely the details specified in
/*
* Normally we should look for precisely the details specified in
@@
-372,6
+373,8
@@
void x11_get_auth_from_authfile(struct X11Display *disp,
if (!authfp)
return;
if (!authfp)
return;
+ ourhostname = get_hostname();
+
/* Records in .Xauthority contain four strings of up to 64K each */
buf = snewn(65537 * 4, char);
/* Records in .Xauthority contain four strings of up to 64K each */
buf = snewn(65537 * 4, char);