[gedit/color-markup-free] open-document-selector: don't free twice	the same object
- From: Sebastien Bacher <sbacher src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gedit/color-markup-free] open-document-selector: don't free twice	the same object
 
- Date: Thu, 28 Feb 2019 22:52:50 +0000 (UTC)
 
commit 656d5a242da5aa8c2d5d00e6f88eedaca4d4c5fb
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]