mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02: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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user