mirror of
https://github.com/brl/mutter.git
synced 2024-11-21 23:50:41 -05:00
cogl: Plug leak in error path
If the renderer fails to connect, we were leaking the renderer. CID: #1505882 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2061>
This commit is contained in:
parent
ccaa4c049b
commit
c869b92d5d
@ -146,6 +146,7 @@ cogl_context_new (CoglDisplay *display,
|
||||
CoglRenderer *renderer = cogl_renderer_new ();
|
||||
if (!cogl_renderer_connect (renderer, error))
|
||||
{
|
||||
cogl_object_unref (renderer);
|
||||
g_free (context);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user