summaryrefslogtreecommitdiff
path: root/src/Distinct.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Distinct.c')
-rw-r--r--src/Distinct.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Distinct.c b/src/Distinct.c
index 8c8bb5f..2260769 100644
--- a/src/Distinct.c
+++ b/src/Distinct.c
@@ -35,6 +35,7 @@ in this Software without prior written authorization from The Open Group.
#include <stdlib.h>
#include <X11/Xutil.h>
#include <X11/Xmu/StdCmap.h>
+#include "Xmuint.h"
/*
* Distinguishable colors routine. Determines if two colors are
@@ -77,7 +78,7 @@ XmuDistinguishablePixels(Display *dpy, Colormap cmap,
for (j = i + 1; j < count; j++)
if (pixels[i] == pixels[j])
return False;
- defs = malloc (count * sizeof (XColor));
+ defs = Xmumallocarray (count, sizeof (XColor));
if (!defs)
return False;
for (i = 0; i < count; i++)