aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xi/xiquerydevice.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-05 14:52:19 +0000
committermarha <marha@users.sourceforge.net>2011-04-05 14:52:19 +0000
commit6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6 (patch)
tree02e0d5fd297602d526b582dc527e007fe20a326f /xorg-server/Xi/xiquerydevice.c
parent1d142834bdb30308784a0654a39b7c0de7e37695 (diff)
parenteaedc21febeadad4cf0e370f5d97e7bdb4470870 (diff)
downloadvcxsrv-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.c7
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;