egl/dri2: Fix memory leak.
Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
@@ -768,6 +768,7 @@ dri2_create_context(_EGLDriver *drv, _EGLDisplay *disp, _EGLConfig *conf,
|
||||
break;
|
||||
default:
|
||||
_eglError(EGL_BAD_PARAMETER, "eglCreateContext");
|
||||
free(dri2_ctx);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user