mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 21:40:08 +01:00
dri: Free the already allocated optionCache and optionInfo on failure
These fields are allocated as they have to be taken into account for initScreen. Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20663>
This commit is contained in:
parent
7e61696de9
commit
bee771412c
1 changed files with 2 additions and 0 deletions
|
|
@ -138,6 +138,8 @@ driCreateNewScreen2(int scrn, int fd,
|
|||
|
||||
*driver_configs = mesa->initScreen(screen);
|
||||
if (*driver_configs == NULL) {
|
||||
driDestroyOptionCache(&screen->optionCache);
|
||||
driDestroyOptionInfo(&screen->optionInfo);
|
||||
free(screen);
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue