[mutter] xprops: Free atom_list_from_results() return value with g_free()
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] xprops: Free atom_list_from_results() return value with g_free()
- Date: Thu, 3 Oct 2019 17:27:38 +0000 (UTC)
commit 2c1553570f3ee4e93481d27b5e92365b165290d5
Author: Hans de Goede <hdegoede redhat com>
Date: Mon Sep 9 16:41:10 2019 +0200
xprops: Free atom_list_from_results() return value with g_free()
atom_list_from_results directly passes through the results->prop
pointer which is g_malloc memory, so we should free the buffer it
returns with g_free.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/786
src/x11/xprops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/x11/xprops.c b/src/x11/xprops.c
index a26231537..c0d0d271a 100644
--- a/src/x11/xprops.c
+++ b/src/x11/xprops.c
@@ -1092,7 +1092,7 @@ free_value (MetaPropValue *value)
case META_PROP_VALUE_WINDOW:
break;
case META_PROP_VALUE_ATOM_LIST:
- free (value->v.atom_list.atoms);
+ g_free (value->v.atom_list.atoms);
break;
case META_PROP_VALUE_TEXT_PROPERTY:
free (value->v.str);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]