pidgin/pidgin

Set GList to NULL after free

16 months ago, qarkai
ac2ec9dc4dc5
Parents 0ce616f8d0ec
Children 00a9ef389aab
Set GList to NULL after free
--- a/libpurple/stringref.c Mon Nov 04 09:58:05 2019 +0300
+++ b/libpurple/stringref.c Mon Nov 04 10:00:14 2019 +0300
@@ -161,6 +161,7 @@
static gboolean gs_idle_cb(gpointer data)
{
g_list_free_full(gclist, (GDestroyNotify)stringref_free);
+ gclist = NULL;
return FALSE;
}
--- a/pidgin/gtkaccount.c Mon Nov 04 09:58:05 2019 +0300
+++ b/pidgin/gtkaccount.c Mon Nov 04 10:00:14 2019 +0300
@@ -807,6 +807,7 @@
}
g_list_free_full(dialog->protocol_opt_entries, (GDestroyNotify)protocol_opt_entry_free);
+ dialog->protocol_opt_entries = NULL;
if (dialog->protocol == NULL ||
purple_protocol_get_account_options(dialog->protocol) == NULL)
--- a/pidgin/gtkblist.c Mon Nov 04 09:58:05 2019 +0300
+++ b/pidgin/gtkblist.c Mon Nov 04 10:00:14 2019 +0300
@@ -3073,9 +3073,16 @@
g_free(td);
}
-void pidgin_blist_tooltip_destroy()
+static void
+pidgin_blist_destroy_tooltip_data(void)
{
g_list_free_full(gtkblist->tooltipdata, (GDestroyNotify)tooltip_data_free);
+ gtkblist->tooltipdata = NULL;
+}
+
+void pidgin_blist_tooltip_destroy()
+{
+ pidgin_blist_destroy_tooltip_data();
pidgin_tooltip_destroy();
}
@@ -3107,7 +3114,7 @@
if (gtkblist->tooltipdata) {
gtkblist->tipwindow = NULL;
- g_list_free_full(gtkblist->tooltipdata, (GDestroyNotify)tooltip_data_free);
+ pidgin_blist_destroy_tooltip_data();
}
gtkblist->tipwindow = widget;
@@ -3296,7 +3303,7 @@
if (gtkblist->tooltipdata) {
gtkblist->tipwindow = NULL;
- g_list_free_full(gtkblist->tooltipdata, (GDestroyNotify)tooltip_data_free);
+ pidgin_blist_destroy_tooltip_data();
}
gtk_tree_model_get_iter(GTK_TREE_MODEL(gtkblist->treemodel), &iter, path);