diff options
author | Emil Velikov <[email protected]> | 2014-01-25 15:56:59 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-02-11 19:00:09 +0000 |
commit | 165eecf1f64b800321745956064ae0a5007b0ca4 (patch) | |
tree | f88c47b560f6417140cdeabf5c489311169a50b9 /src/egl | |
parent | 76d9f6d9729db1c999317a6b44818aa90c30a0b3 (diff) |
egl/dri2/android: free driver_name in dri2_initialize_android error path
v2:
Cleanup driver name if dri2_load_driver() fails. Spotted by Chad
Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/egl')
-rw-r--r-- | src/egl/drivers/dri2/platform_android.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/egl/drivers/dri2/platform_android.c b/src/egl/drivers/dri2/platform_android.c index 4a201c8c6ae..cc19a611349 100644 --- a/src/egl/drivers/dri2/platform_android.c +++ b/src/egl/drivers/dri2/platform_android.c @@ -682,7 +682,7 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *dpy) if (!dri2_load_driver(dpy)) { err = "DRI2: failed to load driver"; - goto cleanup_device; + goto cleanup_driver_name; } dri2_dpy->dri2_loader_extension.base.name = __DRI_DRI2_LOADER; @@ -722,6 +722,8 @@ cleanup_screen: dri2_dpy->core->destroyScreen(dri2_dpy->dri_screen); cleanup_driver: dlclose(dri2_dpy->driver); +cleanup_driver_name: + free(dri2_dpy->driver_name); cleanup_device: close(dri2_dpy->fd); cleanup_display: |