[gtksourceview/gnome-3-24] completion: ensure GList link is freed



commit 2769eb57bf0d9b01e088127ac5efe16c3780c0d5
Author: Christian Hergert <chergert redhat com>
Date:   Tue Feb 19 11:40:04 2019 -0800

    completion: ensure GList link is freed
    
    g_list_remove_link() does not free the GList element. It is not being
    re-used, so it is safe to free it here using g_list_delete_link().

 gtksourceview/gtksourcecompletion.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index fda89e3a..a56da5df 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -2953,7 +2953,7 @@ gtk_source_completion_remove_provider (GtkSourceCompletion          *completion,
                return FALSE;
        }
 
-       completion->priv->providers = g_list_remove_link (completion->priv->providers, item);
+       completion->priv->providers = g_list_delete_link (completion->priv->providers, item);
 
        g_object_unref (provider);
 


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