GDBus: Fix a double free

Fix an unintentional double free introduced in commit
4ad4c306c3.

This bug manifested itself when trying to complete this

 $ gdbus introspect --system --dest <tab>
This commit is contained in:
David Zeuthen 2010-05-14 20:52:15 -04:00
parent 661e5ea69f
commit 4baf104f0a

View File

@ -308,7 +308,7 @@ print_names (GDBusConnection *c,
}
g_variant_get (result, "(as)", &iter);
while (g_variant_iter_loop (iter, "s", &str))
g_hash_table_insert (name_set, str, NULL);
g_hash_table_insert (name_set, g_strdup (str), NULL);
g_variant_iter_free (iter);
g_variant_unref (result);
@ -337,7 +337,7 @@ print_names (GDBusConnection *c,
}
g_variant_get (result, "(as)", &iter);
while (g_variant_iter_loop (iter, "s", &str))
g_hash_table_insert (name_set, str, NULL);
g_hash_table_insert (name_set, g_strdup (str), NULL);
g_variant_iter_free (iter);
g_variant_unref (result);