cogl: Plug leak on error path

If we don't pass the gles version check, the gl_extensions string
is leaked.

CID: #1505846
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2061>
This commit is contained in:
Carlos Garnacho 2021-10-24 23:21:31 +02:00
parent ed9650ff42
commit f6726c61ca

View File

@ -348,6 +348,7 @@ _cogl_driver_update_features (CoglContext *context,
COGL_DRIVER_ERROR, COGL_DRIVER_ERROR,
COGL_DRIVER_ERROR_INVALID_VERSION, COGL_DRIVER_ERROR_INVALID_VERSION,
"OpenGL ES 2.0 or better is required"); "OpenGL ES 2.0 or better is required");
g_strfreev (gl_extensions);
return FALSE; return FALSE;
} }