[gedit] open-document-selector: don't free twice the same object
- From: Sébastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] open-document-selector: don't free twice the same object
- Date: Sat, 2 Mar 2019 18:12:54 +0000 (UTC)
commit 4600b8230b94c733ae1db1b0b690cf77d0da7e4b
Author: Sebastien Bacher <seb128 ubuntu com>
Date: Wed Feb 27 17:23:57 2019 +0100
open-document-selector: don't free twice the same object
Dispose can be called a second time, use g_clear_pointer to avoid an
invalid free call, fix #129.
gedit/gedit-open-document-selector.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gedit/gedit-open-document-selector.c b/gedit/gedit-open-document-selector.c
index 7a6feb5c2..847807a51 100644
--- a/gedit/gedit-open-document-selector.c
+++ b/gedit/gedit-open-document-selector.c
@@ -750,7 +750,7 @@ gedit_open_document_selector_dispose (GObject *object)
g_clear_pointer (&selector->name_font, pango_font_description_free);
g_clear_pointer (&selector->path_font, pango_font_description_free);
- g_free (selector->match_markup_color);
+ g_clear_pointer (&selector->match_markup_color, g_free);
if (selector->recent_items)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]