[mutter/wip/carlosg/coverity-fixes: 8/8] clutter: Plug leak on error condition
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/coverity-fixes: 8/8] clutter: Plug leak on error condition
- Date: Mon, 25 Oct 2021 12:03:03 +0000 (UTC)
commit 117a1a168eab8a32e571dab7f6982b9244465d8e
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Oct 25 00:18:39 2021 +0200
clutter: Plug leak on error condition
The ClutterContext is leaked if not properly initialized.
CID: #1508079
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 8d3769e3ae..a2a841c59c 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]