[epiphany/mcatanzaro/history-dialog: 9/9] history-dialog: be careful not to leak self->urls




commit d9f3dfad4798767e628ce0e7669e141f3b329bd2
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Tue May 4 15:11:44 2021 -0500

    history-dialog: be careful not to leak self->urls
    
    I don't *think* this can happen, but let's be certain it really cannot
    happen.
    
    Part-of: <https://gitlab.gnome.org/GNOME/epiphany/-/merge_requests/960>

 src/ephy-history-dialog.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/ephy-history-dialog.c b/src/ephy-history-dialog.c
index 8e5340cf1..1fc33860d 100644
--- a/src/ephy-history-dialog.c
+++ b/src/ephy-history-dialog.c
@@ -276,6 +276,8 @@ on_find_urls_cb (gpointer service,
   if (!success)
     return;
 
+  if (self->urls)
+    ephy_history_url_list_free (self->urls);
   self->urls = ephy_history_url_list_copy (result_data);
 
   clear_listbox (self->listbox);


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