If dri2_setup_extensions() fails, the "err" variable would not be assigned
causing the error path to access an unitialized variable. Fix it by
assigning an error message.
Fixes: 2c341f2bda4 ("egl: refactor dri2_create_screen() into three separate functions")
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
goto cleanup;
}
- if (!dri2_setup_extensions(dpy))
+ if (!dri2_setup_extensions(dpy)) {
+ err = "DRI2: failed to setup extensions";
goto cleanup;
+ }
dri2_setup_screen(dpy);