summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2006-04-07 01:26:33 +0000
committerAdam Jackson <ajax@nwnk.net>2006-04-07 01:26:33 +0000
commit49abff79957799e9229d5c0226ee1b0d7505003d (patch)
tree39c31b3e30da56c650574ac4dd650d0832fc4e66 /hw
parentbda292120fc97f890c1f58a31177c0f7c0bfa048 (diff)
Coverity #818: Avoid memory leak on error path.
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/dixmods/extmod/xf86vmode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/xfree86/dixmods/extmod/xf86vmode.c b/hw/xfree86/dixmods/extmod/xf86vmode.c
index 2a3037c0e..bcd08bf90 100644
--- a/hw/xfree86/dixmods/extmod/xf86vmode.c
+++ b/hw/xfree86/dixmods/extmod/xf86vmode.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;