Signed-off-by: Pauli Nieminen <[email protected]>
---
 hw/xfree86/dri2/dri2.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c
index b20e96d..f4f34cc 100644
--- a/hw/xfree86/dri2/dri2.c
+++ b/hw/xfree86/dri2/dri2.c
@@ -868,18 +868,14 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
        /* Driver too old: use the old-style driverName field */
        ds->numDrivers = 1;
        ds->driverNames = xalloc(sizeof(*ds->driverNames));
-       if (!ds->driverNames) {
-           xfree(ds);
-           return FALSE;
-       }
+       if (!ds->driverNames)
+           goto err_out;
        ds->driverNames[0] = info->driverName;
     } else {
        ds->numDrivers = info->numDrivers;
        ds->driverNames = xalloc(info->numDrivers * sizeof(*ds->driverNames));
-       if (!ds->driverNames) {
-           xfree(ds);
-           return FALSE;
-       }
+       if (!ds->driverNames)
+               goto err_out;
        memcpy(ds->driverNames, info->driverNames,
               info->numDrivers * sizeof(*ds->driverNames));
     }
-- 
1.6.3.3

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to