mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-20 20:12:21 +00:00
Coverity #806: Another memory leak on OOM path.
This commit is contained in:
parent
1b04e31392
commit
d61219aaad
2 changed files with 8 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue