From: Juha-Pekka Heikkila Date: Fri, 7 Feb 2014 12:43:58 +0000 (+0200) Subject: glx: Add missing null check in __glXCloseDisplay X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2ae1437a8ecf81676012c7a3507a6ed58e7338b2;p=mesa.git glx: Add missing null check in __glXCloseDisplay Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Brian Paul --- diff --git a/src/glx/glxext.c b/src/glx/glxext.c index 2711e57b793..4a195bd40ba 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -269,7 +269,8 @@ __glXCloseDisplay(Display * dpy, XExtCodes * codes) } _XUnlockMutex(_Xglobal_lock); - glx_display_free(priv); + if (priv != NULL) + glx_display_free(priv); return 1; }