egl/x11: Fix leak in dri3_create_image_khr_pixmap
authorLouis-Francis Ratté-Boulianne <lfrb@collabora.com>
Tue, 13 Feb 2018 03:26:10 +0000 (22:26 -0500)
committerDaniel Stone <daniels@collabora.com>
Wed, 14 Feb 2018 11:52:06 +0000 (11:52 +0000)
bp_reply wasn't properly free'd

Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
src/egl/drivers/dri2/platform_x11_dri3.c

index 6e40eaa596ad05a79dfe4d8bd818be33ee8ec5cb..6ead4d0a22209e48cbda5e2b4e72dcb54ef743d9 100644 (file)
@@ -285,6 +285,7 @@ dri3_create_image_khr_pixmap(_EGLDisplay *disp, _EGLContext *ctx,
    dri2_img = malloc(sizeof *dri2_img);
    if (!dri2_img) {
       _eglError(EGL_BAD_ALLOC, "dri3_create_image_khr");
+      free(bp_reply);
       return EGL_NO_IMAGE_KHR;
    }