network: Plug memory leaks

https://bugzilla.gnome.org/show_bug.cgi?id=693879
This commit is contained in:
Thomas Bechtold 2013-02-15 13:22:07 +01:00 committed by Bastien Nocera
parent f0b3d1afaa
commit b5335bf2e7
4 changed files with 7 additions and 0 deletions

View file

@ -87,6 +87,7 @@ void
net_object_set_id (NetObject *object, const gchar *id)
{
g_return_if_fail (NET_IS_OBJECT (object));
g_clear_pointer (&object->priv->id, g_free);
object->priv->id = g_strdup (id);
g_object_notify (G_OBJECT (object), "id");
}
@ -109,6 +110,7 @@ void
net_object_set_title (NetObject *object, const gchar *title)
{
g_return_if_fail (NET_IS_OBJECT (object));
g_clear_pointer (&object->priv->title, g_free);
object->priv->title = g_strdup (title);
g_object_notify (G_OBJECT (object), "title");
}