mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-30 05:00:32 +01: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> (cherry picked from commit43d470404c) Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> [Juan A. Suarez: resolve trivial conflicts] Conflicts: src/egl/main/egldriver.c
This commit is contained in:
parent
524373ba99
commit
5fcb149a46
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;
|
||||
}
|
||||
_eglInitDriverFallbacks(_eglDriver);
|
||||
_eglInitDriver(_eglDriver);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue