aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/src/GetRGBCMap.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/lib/src/GetRGBCMap.c')
-rw-r--r--nx-X11/lib/src/GetRGBCMap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nx-X11/lib/src/GetRGBCMap.c b/nx-X11/lib/src/GetRGBCMap.c
index 746b53fbf..1e04f1612 100644
--- a/nx-X11/lib/src/GetRGBCMap.c
+++ b/nx-X11/lib/src/GetRGBCMap.c
@@ -33,6 +33,7 @@ from The Open Group.
#include <nx-X11/Xlibint.h>
#include <nx-X11/Xutil.h>
#include "Xatomtype.h"
+#include "reallocarray.h"
#include <nx-X11/Xatom.h>
Status XGetRGBColormaps (
@@ -99,7 +100,7 @@ Status XGetRGBColormaps (
/*
* allocate array
*/
- cmaps = Xmalloc (ncmaps * sizeof (XStandardColormap));
+ cmaps = Xmallocarray (ncmaps, sizeof (XStandardColormap));
if (!cmaps) {
Xfree (data);
return False;