mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
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:
parent
661e5ea69f
commit
4baf104f0a
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user