From 2ae1437a8ecf81676012c7a3507a6ed58e7338b2 Mon Sep 17 00:00:00 2001 From: Juha-Pekka Heikkila Date: Fri, 7 Feb 2014 14:43:58 +0200 Subject: [PATCH] glx: Add missing null check in __glXCloseDisplay Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Brian Paul --- src/glx/glxext.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 2.30.2