diff options
author | marha <marha@users.sourceforge.net> | 2011-04-05 14:52:19 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-05 14:52:19 +0000 |
commit | 6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6 (patch) | |
tree | 02e0d5fd297602d526b582dc527e007fe20a326f /xorg-server/Xi/xiquerydevice.c | |
parent | 1d142834bdb30308784a0654a39b7c0de7e37695 (diff) | |
parent | eaedc21febeadad4cf0e370f5d97e7bdb4470870 (diff) | |
download | vcxsrv-6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6.tar.gz vcxsrv-6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6.tar.bz2 vcxsrv-6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6.zip |
svn merge ^/branches/released .
Diffstat (limited to 'xorg-server/Xi/xiquerydevice.c')
-rw-r--r-- | xorg-server/Xi/xiquerydevice.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xorg-server/Xi/xiquerydevice.c b/xorg-server/Xi/xiquerydevice.c index f8a4eb8a5..7066a1ab9 100644 --- a/xorg-server/Xi/xiquerydevice.c +++ b/xorg-server/Xi/xiquerydevice.c @@ -107,8 +107,10 @@ ProcXIQueryDevice(ClientPtr client) }
info = calloc(1, len);
- if (!info)
+ if (!info) {
+ free(skip);
return BadAlloc;
+ }
memset(&rep, 0, sizeof(xXIQueryDeviceReply));
rep.repType = X_Reply;
@@ -153,8 +155,9 @@ ProcXIQueryDevice(ClientPtr client) }
}
+ len = rep.length * 4;
WriteReplyToClient(client, sizeof(xXIQueryDeviceReply), &rep);
- WriteToClient(client, rep.length * 4, ptr);
+ WriteToClient(client, len, ptr);
free(ptr);
free(skip);
return rc;
|