egl/x11: don't leak xfixes_query in the error path
[mesa.git] / src / egl / drivers / dri2 / platform_x11.c
index 35c62a4975aaccd69228c29873f6b795a857d1cc..61e700f7ecbaad19a2be347c5435ca40d1505b43 100644 (file)
@@ -646,6 +646,7 @@ dri2_x11_connect(struct dri2_egl_display *dri2_dpy)
        error != NULL || xfixes_query->major_version < 2) {
       _eglLog(_EGL_WARNING, "DRI2: failed to query xfixes version");
       free(error);
+      free(xfixes_query);
       return EGL_FALSE;
    }
    free(xfixes_query);