Commit d76947b6 authored by Daniel Stone's avatar Daniel Stone

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's avatarDaniel Stone <daniels@collabora.com>
Reported-by: default avatarEmil Velikov <emil.velikov@collabora.com>
parent 6d2e73b3
......@@ -3596,6 +3596,7 @@ fail_terminate:
eglTerminate(gr->egl_display);
fail:
free(gr);
ec->renderer = NULL;
return -1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment