Coverity #806: Another memory leak on OOM path.

This commit is contained in:
Adam Jackson 2006-04-14 23:38:11 +00:00
parent 1b04e31392
commit d61219aaad
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;