summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/XRes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/XRes.c b/src/XRes.c
index d061dd7..af89f77 100644
--- a/src/XRes.c
+++ b/src/XRes.c
@@ -113,7 +113,7 @@ XResQueryClients(Display *dpy, int *num_clients, XResClient **clients)
XResClient *clnts;
if (rep.num_clients < (INT_MAX / sizeof(XResClient)))
- clnts = Xmalloc(sizeof(XResClient) * rep.num_clients);
+ clnts = Xcalloc(rep.num_clients, sizeof(XResClient));
else
clnts = NULL;
@@ -168,7 +168,7 @@ XResQueryClientResources(Display *dpy, XID xid,
XResType *typs;
if (rep.num_types < (INT_MAX / sizeof(XResType)))
- typs = Xmalloc(sizeof(XResType) * rep.num_types);
+ typs = Xcalloc(rep.num_types, sizeof(XResType));
else
typs = NULL;