summaryrefslogtreecommitdiffstats
path: root/src/egl
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-07-11 10:48:59 +0200
committerChristian König <[email protected]>2011-07-11 10:48:59 +0200
commitf919547f3785b1d8839b9fc5c00ac397e30896a1 (patch)
tree910cd4fd7ffcd2781a303bb79395a0ee3c044c7d /src/egl
parentcd4f18089e44872ce9e3c04ac5e808a7204ffc49 (diff)
parent12265d26ddc72f62de927ac24e12ab41fcd8d1c5 (diff)
Merge remote-tracking branch 'origin/master' into pipe-video
Conflicts: src/gallium/drivers/r600/r600_pipe.c src/gallium/drivers/r600/r600_state_inlines.h
Diffstat (limited to 'src/egl')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c8
-rw-r--r--src/egl/drivers/dri2/platform_x11.c1
-rw-r--r--src/egl/wayland/wayland-drm/wayland-drm.c1
3 files changed, 8 insertions, 2 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index 5680c360f1d..35a598ecab8 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -923,8 +923,10 @@ dri2_create_image_khr_renderbuffer(_EGLDisplay *disp, _EGLContext *ctx,
return EGL_NO_IMAGE_KHR;
}
- if (!_eglInitImage(&dri2_img->base, disp))
+ if (!_eglInitImage(&dri2_img->base, disp)) {
+ free(dri2_img);
return EGL_NO_IMAGE_KHR;
+ }
dri2_img->dri_image =
dri2_dpy->image->createImageFromRenderbuffer(dri2_ctx->dri_context,
@@ -1335,8 +1337,10 @@ _EGL_MAIN(const char *args)
memset(dri2_drv, 0, sizeof *dri2_drv);
- if (!dri2_load(&dri2_drv->base))
+ if (!dri2_load(&dri2_drv->base)) {
+ free(dri2_drv);
return NULL;
+ }
_eglInitDriverFallbacks(&dri2_drv->base);
dri2_drv->base.API.Initialize = dri2_initialize;
diff --git a/src/egl/drivers/dri2/platform_x11.c b/src/egl/drivers/dri2/platform_x11.c
index 4e00c958cbd..f27bf176fb6 100644
--- a/src/egl/drivers/dri2/platform_x11.c
+++ b/src/egl/drivers/dri2/platform_x11.c
@@ -845,6 +845,7 @@ dri2_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
if (!_eglInitImage(&dri2_img->base, disp)) {
free(buffers_reply);
free(geometry_reply);
+ free(dri2_img);
return EGL_NO_IMAGE_KHR;
}
diff --git a/src/egl/wayland/wayland-drm/wayland-drm.c b/src/egl/wayland/wayland-drm/wayland-drm.c
index 3023cd02b07..ec96c045143 100644
--- a/src/egl/wayland/wayland-drm/wayland-drm.c
+++ b/src/egl/wayland/wayland-drm/wayland-drm.c
@@ -104,6 +104,7 @@ drm_create_buffer(struct wl_client *client, struct wl_drm *drm,
wl_client_post_error(client, &drm->object,
WL_DRM_ERROR_INVALID_VISUAL,
"invalid visual");
+ free(buffer);
return;
}