summaryrefslogtreecommitdiff
path: root/mi/micmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mi/micmap.c')
-rw-r--r--mi/micmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mi/micmap.c b/mi/micmap.c
index da2f4d88e..0e94606b9 100644
--- a/mi/micmap.c
+++ b/mi/micmap.c
@@ -587,8 +587,10 @@ miDoInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp,
if (nvtype)
{
vid = (VisualID *) xalloc (nvtype * sizeof (VisualID));
- if (!vid)
+ if (!vid) {
+ xfree(preferredCVCs);
return FALSE;
+ }
}
depth->depth = d;
depth->numVids = nvtype;