Commit 49abff79 authored by Adam Jackson's avatar Adam Jackson 💣

Coverity #818: Avoid memory leak on error path.

parent bda29212
2006-04-06 Adam Jackson <ajax@freedesktop.org>
* hw/xfree86/dixmods/extmod/xf86vmode.c:
Coverity #818: Avoid memory leak on error path.
2006-04-06 Adam Jackson <ajax@freedesktop.org>
* GL/glx/single2.c:
......
......@@ -29,7 +29,7 @@ or other dealings in this Software without prior written authorization
from Kaleb S. KEITHLEY
*/
/* $XdotOrg: xserver/xorg/hw/xfree86/dixmods/extmod/xf86vmode.c,v 1.8 2005/07/16 03:49:58 kem Exp $ */
/* $XdotOrg: xserver/xorg/hw/xfree86/dixmods/extmod/xf86vmode.c,v 1.9 2006/02/10 22:00:24 anholt Exp $ */
/* $Xorg: xf86vmode.c,v 1.3 2000/08/17 19:47:59 cpqbld Exp $ */
/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
......@@ -1589,8 +1589,10 @@ ProcXF86VidModeGetGammaRamp(ClientPtr client)
return BadAlloc;
if (!VidModeGetGammaRamp(stuff->screen, stuff->size,
ramp, ramp + length, ramp + (length * 2)))
ramp, ramp + length, ramp + (length * 2))) {
xfree(ramp);
return BadValue;
}
}
rep.type = X_Reply;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment