diff options
author | Eric Engestrom <[email protected]> | 2019-08-26 15:29:49 +0100 |
---|---|---|
committer | Eric Engestrom <[email protected]> | 2019-09-04 00:10:18 +0100 |
commit | 43d470404c47d86d1fab93d1345e09375bcf4fb6 (patch) | |
tree | 3de95214f1728e9b9d661fb68279a3d4e2ef3ba7 /src | |
parent | 3afe9d798aacc0abc6d898dda3360f06517caf8e (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]>
Diffstat (limited to 'src')
-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); } |