[PATCH] libupower-glib: fix small memory leak

Pavel Vasin rat4vier at gmail.com
Wed Apr 25 04:33:52 PDT 2012


---
 libupower-glib/up-client.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/libupower-glib/up-client.c b/libupower-glib/up-client.c
index 8dccbde..8ea131b 100644
--- a/libupower-glib/up-client.c
+++ b/libupower-glib/up-client.c
@@ -339,6 +339,7 @@ up_client_get_properties_sync (UpClient *client, GCancellable *cancellable, GErr
 		g_warning ("No 'DaemonVersion' property");
 		goto out;
 	}
+	g_free (client->priv->daemon_version);
 	client->priv->daemon_version = g_strdup (g_value_get_string (value));
 
 	value = g_hash_table_lookup (props, "CanSuspend");
-- 
1.7.10



More information about the devkit-devel mailing list