summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2006-04-14 23:38:02 +0000
committerAdam Jackson <ajax@nwnk.net>2006-04-14 23:38:02 +0000
commit101833e7c19550686688bfc90b3936dec5127d38 (patch)
treed17257511225647073815ea491d1f3ddfe0cf02e
parent2d5e31076b04c81156f357659af912647894e1cf (diff)
Coverity #806: Another memory leak on OOM path.
-rw-r--r--ChangeLog5
-rw-r--r--mi/micmap.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index c3cc1ce2a..0e285bd19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2006-04-14 Adam Jackson <ajax@freedesktop.org>
+ * mi/micmap.c:
+ Coverity #806: Another memory leak on OOM path.
+
+2006-04-14 Adam Jackson <ajax@freedesktop.org>
+
* hw/xfree86/common/xf86Helper.c:
Coverity #847, #848, #849: Three more memory leaks.
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;