diff options
Diffstat (limited to 'libX11/src/Host.c')
-rw-r--r-- | libX11/src/Host.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libX11/src/Host.c b/libX11/src/Host.c index da9923a9e..da5e2f7d3 100644 --- a/libX11/src/Host.c +++ b/libX11/src/Host.c @@ -83,6 +83,10 @@ XAddHost ( LockDisplay(dpy); GetReqExtra (ChangeHosts, length, req); + if (!req) { + UnlockDisplay(dpy); + return 0; + } req->mode = HostInsert; req->hostFamily = host->family; req->hostLength = addrlen; @@ -118,6 +122,10 @@ XRemoveHost ( LockDisplay(dpy); GetReqExtra (ChangeHosts, length, req); + if (!req) { + UnlockDisplay(dpy); + return 0; + } req->mode = HostDelete; req->hostFamily = host->family; req->hostLength = addrlen; |