diff options
author | Eric Engestrom <[email protected]> | 2019-08-26 15:29:49 +0100 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2019-09-04 16:14:41 -0700 |
commit | 1a4e7d72930c081b760caa6918836e46fd791bad (patch) | |
tree | 656e20d5682b442235966d40b86297bcbe065dc0 /src/egl | |
parent | 1cfc90689816643820c2383e375794c40eecd7e6 (diff) |
egl: fix deadlock in malloc error path
Fixes: cb0980e69aa921af7086 ("egl: move alloc & init out of _eglBuiltInDriver{DRI2,Haiku}")
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
(cherry picked from commit 43d470404c47d86d1fab93d1345e09375bcf4fb6)
Diffstat (limited to 'src/egl')
-rw-r--r-- | src/egl/main/egldriver.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c index e719b19a63f..0d8919aa0e1 100644 --- a/src/egl/main/egldriver.c +++ b/src/egl/main/egldriver.c @@ -56,8 +56,10 @@ _eglGetDriver(void) if (!_eglDriver) { _eglDriver = calloc(1, sizeof(*_eglDriver)); - if (!_eglDriver) + if (!_eglDriver) { + mtx_unlock(&_eglModuleMutex); return NULL; + } _eglInitDriver(_eglDriver); } |