From 90ad8b88d49bb7d9c8366e5e8360f4c7db3c39f5 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Mon, 25 Oct 2021 00:18:39 +0200 Subject: [PATCH] clutter: Plug leak on error condition The ClutterContext is leaked if not properly initialized. CID: #1508079 Part-of: --- clutter/clutter/clutter-main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clutter/clutter/clutter-main.c b/clutter/clutter/clutter-main.c index 8d3769e3a..a2a841c59 100644 --- a/clutter/clutter/clutter-main.c +++ b/clutter/clutter/clutter-main.c @@ -619,7 +619,10 @@ clutter_context_new (ClutterBackendConstructor backend_constructor, clutter_context->last_repaint_id = 1; if (!clutter_init_real (clutter_context, error)) - return NULL; + { + g_free (clutter_context); + return NULL; + } ClutterCntx = clutter_context;