[devhelp/gnome-2-28] Fix small leak in search_complete_idle()



commit b2e6333bf9d623955290cf63eb7d54a8d5563b9d
Author: Jonathon Jongsma <jonathon quotidian org>
Date:   Tue Sep 29 15:44:10 2009 -0500

    Fix small leak in search_complete_idle()
    
    This patch should fix the following leak:
    
    ==17510== 15 bytes in 2 blocks are definitely lost in loss record 868 of 9,665
    ==17510==    at 0x4C214CB: calloc (vg_replace_malloc.c:418)
    ==17510==    by 0x7BAC1D9: g_malloc0 (gmem.c:151)
    ==17510==    by 0x7B8BE8E: g_completion_complete (gcompletion.c:160)
    ==17510==    by 0x504344B: search_complete_idle (dh-search.c:394)
    ==17510==    by 0x7BA3E09: g_main_context_dispatch (gmain.c:1960)
    ==17510==    by 0x7BA7667: g_main_context_iterate (gmain.c:2591)
    ==17510==    by 0x7BA7B3C: g_main_loop_run (gmain.c:2799)
    ==17510==    by 0xB6658E6: gtk_main (gtkmain.c:1205)
    ==17510==    by 0x402044: main (dh-main.c:299)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=596808
    (cherry picked from commit 2d92c8132b9d375a720d8171014b9ebc43b30846)

 src/dh-search.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/dh-search.c b/src/dh-search.c
index c921143..af59651 100644
--- a/src/dh-search.c
+++ b/src/dh-search.c
@@ -399,6 +399,7 @@ search_complete_idle (DhSearch *search)
                 gtk_editable_set_position (GTK_EDITABLE (priv->entry), length);
                 gtk_editable_select_region (GTK_EDITABLE (priv->entry),
                                             length, -1);
+                g_free (completed);
         }
 
         priv->idle_complete = 0;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]