mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 07:38:10 +02:00
egl: fix deadlock in malloc error path
Fixes: cb0980e69a ("egl: move alloc & init out of _eglBuiltInDriver{DRI2,Haiku}")
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
This commit is contained in:
parent
3afe9d798a
commit
43d470404c
1 changed files with 3 additions and 1 deletions
|
|
@ -56,8 +56,10 @@ _eglGetDriver(void)
|
|||
|
||||
if (!_eglDriver) {
|
||||
_eglDriver = calloc(1, sizeof(*_eglDriver));
|
||||
if (!_eglDriver)
|
||||
if (!_eglDriver) {
|
||||
mtx_unlock(&_eglModuleMutex);
|
||||
return NULL;
|
||||
}
|
||||
_eglInitDriver(_eglDriver);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue