1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
| | From 38d3fda8849ac327b473ac11dfac5499f595b7ac Mon Sep 17 00:00:00 2001
Message-ID: <38d3fda8849ac327b473ac11dfac5499f595b7ac.1694118000.git.vivien@planete-kraus.eu>
In-Reply-To: <cover.1694118000.git.vivien@planete-kraus.eu>
References: <cover.1694118000.git.vivien@planete-kraus.eu>
From: Vivien Kraus <vivien@planete-kraus.eu>
Date: Thu, 7 Sep 2023 22:16:48 +0200
Subject: [PATCH 1/1] Prevent double free on context objects
The display is unrefed in the context destructor, but not refed in the
constructor.
This targets an archived (read-only) repository.
---
cogl/cogl-context.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c
index a7eed29a..22809424 100644
--- a/cogl/cogl-context.c
+++ b/cogl/cogl-context.c
@@ -219,6 +219,7 @@ cogl_context_new (CoglDisplay *display,
}
context->display = display;
+ cogl_object_ref (display);
/* This is duplicated data, but it's much more convenient to have
the driver attached to the context and the value is accessed a
--
2.41.0
|