summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86Config.c
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2006-04-07 01:35:43 +0000
committerAdam Jackson <ajax@nwnk.net>2006-04-07 01:35:43 +0000
commitb472ce7307dd88a21c7713a2b127e34f5c2bc817 (patch)
tree0c39cec26e70b90bc16cf636aac5767a56849b62 /hw/xfree86/common/xf86Config.c
parent9c84ed5f8d9eded1a8b509c9cad1ca0ebcf2166a (diff)
Coverity #836: Fix another memory leak.
Diffstat (limited to 'hw/xfree86/common/xf86Config.c')
-rw-r--r--hw/xfree86/common/xf86Config.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index f2d2a409b..8b5769168 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -1,4 +1,4 @@
-/* $XdotOrg: xserver/xorg/hw/xfree86/common/xf86Config.c,v 1.24 2006/04/03 22:00:06 ajax Exp $ */
+/* $XdotOrg: xserver/xorg/hw/xfree86/common/xf86Config.c,v 1.25 2006/04/07 01:34:29 ajax Exp $ */
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Config.c,v 3.276 2003/10/08 14:58:26 dawes Exp $ */
@@ -2034,8 +2034,10 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen)
slp = xnfcalloc(1, 2 * sizeof(screenLayoutRec));
slp[0].screen = xnfcalloc(1, sizeof(confScreenRec));
slp[1].screen = NULL;
- if (!configScreen(slp[0].screen, conf_screen, 0, from))
+ if (!configScreen(slp[0].screen, conf_screen, 0, from)) {
+ xfree(slp);
return FALSE;
+ }
servlayoutp->id = "(implicit)";
servlayoutp->screens = slp;
servlayoutp->inactives = xnfcalloc(1, sizeof(GDevRec));