the critical error would use driverName.
Found by internal RH coverity scan.
Note: This is a candidate for stable branches.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit
a0ec9185eb90568ab57170dc682de0ba0c9e5e62)
Conflicts:
src/glx/dri_glx.c
}
psc->driver = driOpenDriver(driverName);
- Xfree(driverName);
if (psc->driver == NULL)
goto cleanup;
psp->setSwapInterval = driSetSwapInterval;
psp->getSwapInterval = driGetSwapInterval;
+ free(driverName);
+
return &psc->base;
cleanup:
CriticalErrorMessageF("failed to load driver: %s\n", driverName);
+ free(driverName);
+
if (psc->driver)
dlclose(psc->driver);
glx_screen_cleanup(&psc->base);