glx: do not leak dri3Display
authorEmil Velikov <emil.l.velikov@gmail.com>
Sat, 10 May 2014 02:41:45 +0000 (03:41 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sun, 25 May 2014 22:21:46 +0000 (23:21 +0100)
v2: Do not wrap the code in ifdef HAVE_DRI3 (suggested by Keith)

Cc: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
Cc: Keith Packard <keithp@keithp.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
src/glx/glxext.c

index 24c80d4f31d51f0f33fe548595ac49203a363a26..8528e88f24ba1c40cbcab5ef1d35d9928dea06a0 100644 (file)
@@ -249,6 +249,10 @@ glx_display_free(struct glx_display *priv)
    if (priv->dri2Display)
       (*priv->dri2Display->destroyDisplay) (priv->dri2Display);
    priv->dri2Display = NULL;
+
+   if (priv->dri3Display)
+      (*priv->dri3Display->destroyDisplay) (priv->dri3Display);
+   priv->dri3Display = NULL;
 #endif
 
    free((char *) priv);