diff options
author | Emil Velikov <[email protected]> | 2014-03-16 02:56:18 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-04-09 22:12:35 +0100 |
commit | f9832f960fa8edcee0eb6866698cc5f9f25bd8f9 (patch) | |
tree | 148703b3b30925e93c48be19fd18753e4b277e36 /src/glx/glxext.c | |
parent | 6afd7be1326986d097efc3b0fed0438106e2fba2 (diff) |
glx: drop obsolete _XUnlock_Mutex in __glXInitialize error path
With commit 1f1928db001(glx: Drop _Xglobal_lock while we create and
initialize glx display) we've split the big _Xglobal_lock handling in
a more fine grained manner.
Unfortunatelly we forgot to drop the unlock_mutex on the error paths,
leading to undefined behaviour as the mutex is already unlocked.
Cc: Kristian Høgsberg <[email protected]>
Cc: "9.2 10.0 10.1" <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glx/glxext.c')
-rw-r--r-- | src/glx/glxext.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/glx/glxext.c b/src/glx/glxext.c index 0838cd19251..29317906d52 100644 --- a/src/glx/glxext.c +++ b/src/glx/glxext.c @@ -830,7 +830,6 @@ __glXInitialize(Display * dpy) dpyPriv->codes = XInitExtension(dpy, __glXExtensionName); if (!dpyPriv->codes) { free(dpyPriv); - _XUnlockMutex(_Xglobal_lock); return NULL; } @@ -846,7 +845,6 @@ __glXInitialize(Display * dpy) &dpyPriv->majorVersion, &dpyPriv->minorVersion) || (dpyPriv->majorVersion == 1 && dpyPriv->minorVersion < 1)) { free(dpyPriv); - _XUnlockMutex(_Xglobal_lock); return NULL; } @@ -911,7 +909,7 @@ __glXInitialize(Display * dpy) dpyPriv->next = glx_displays; glx_displays = dpyPriv; - _XUnlockMutex(_Xglobal_lock); + _XUnlockMutex(_Xglobal_lock); return dpyPriv; } |