gl-renderer: Avoid double-free on init failure
If gl-renderer fails its initialisation, we return to compositor teardown, which will try to free the renderer if ec->renderer was set. This is unfortunate when we've already torn it down whilst failing gl-renderer init, so just clear the renderer member so we don't try to tear down twice. Signed-off-by: Daniel Stone <daniels@collabora.com> Reported-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
parent
6d2e73b314
commit
d76947b666
|
@ -3596,6 +3596,7 @@ fail_terminate:
|
|||
eglTerminate(gr->egl_display);
|
||||
fail:
|
||||
free(gr);
|
||||
ec->renderer = NULL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue