mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 05:56:14 +01:00
gio/*: Use g_slist_free_full() convenience function
This commit is contained in:
parent
31c3082e19
commit
c735b54a63
@ -195,8 +195,7 @@ g_file_monitor_dispose (GObject *object)
|
|||||||
g_source_unref (priv->pending_file_change_source);
|
g_source_unref (priv->pending_file_change_source);
|
||||||
priv->pending_file_change_source = NULL;
|
priv->pending_file_change_source = NULL;
|
||||||
}
|
}
|
||||||
g_slist_foreach (priv->pending_file_changes, (GFunc) file_change_free, NULL);
|
g_slist_free_full (priv->pending_file_changes, (GDestroyNotify) file_change_free);
|
||||||
g_slist_free (priv->pending_file_changes);
|
|
||||||
priv->pending_file_changes = NULL;
|
priv->pending_file_changes = NULL;
|
||||||
|
|
||||||
/* Make sure we cancel on last unref */
|
/* Make sure we cancel on last unref */
|
||||||
|
@ -160,8 +160,7 @@ g_memory_input_stream_finalize (GObject *object)
|
|||||||
stream = G_MEMORY_INPUT_STREAM (object);
|
stream = G_MEMORY_INPUT_STREAM (object);
|
||||||
priv = stream->priv;
|
priv = stream->priv;
|
||||||
|
|
||||||
g_slist_foreach (priv->chunks, free_chunk, NULL);
|
g_slist_free_full (priv->chunks, free_chunk);
|
||||||
g_slist_free (priv->chunks);
|
|
||||||
|
|
||||||
G_OBJECT_CLASS (g_memory_input_stream_parent_class)->finalize (object);
|
G_OBJECT_CLASS (g_memory_input_stream_parent_class)->finalize (object);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user