Coverity #806: Another memory leak on OOM path.

This commit is contained in:
Adam Jackson 2006-04-14 23:38:02 +00:00
parent 2d5e31076b
commit 101833e7c1
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
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:

View file

@ -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;