[gimp] libgimpwidgets: do not free cache before using it for debug output.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpwidgets: do not free cache before using it for debug output.
- Date: Fri, 1 Oct 2021 10:26:44 +0000 (UTC)
commit 22f234e5b036905ac3f0cfa0d53f930e09b5caa2
Author: Jehan <jehan girinstud io>
Date: Fri Oct 1 12:25:34 2021 +0200
libgimpwidgets: do not free cache before using it for debug output.
Thanks to Massimo for noticing this use-after-free bug.
libgimpwidgets/gimpwidgetsutils.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libgimpwidgets/gimpwidgetsutils.c b/libgimpwidgets/gimpwidgetsutils.c
index fc7605a59a..02dd697452 100644
--- a/libgimpwidgets/gimpwidgetsutils.c
+++ b/libgimpwidgets/gimpwidgetsutils.c
@@ -727,10 +727,10 @@ transform_cache_config_notify (GObject *config,
if (cache->proof_profile)
g_object_unref (cache->proof_profile);
- g_free (cache);
-
if (debug_cache)
g_printerr ("deleted cache %p\n", cache);
+
+ g_free (cache);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]