mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2024-12-22 12:48:51 +00:00
secret-session: Avoid double-free in service_encode_plain_secret()
As g_variant_builder_add_value() takes ownership of a floating GVariant, we don't need to unref it afterwards.
This commit is contained in:
parent
83774b8b93
commit
9ca8f323a9
@ -612,12 +612,10 @@ service_encode_plain_secret (SecretSession *session,
|
|||||||
|
|
||||||
child = g_variant_new_from_data (G_VARIANT_TYPE ("ay"), "", 0, TRUE, NULL, NULL);
|
child = g_variant_new_from_data (G_VARIANT_TYPE ("ay"), "", 0, TRUE, NULL, NULL);
|
||||||
g_variant_builder_add_value (builder, child);
|
g_variant_builder_add_value (builder, child);
|
||||||
g_variant_unref (child);
|
|
||||||
|
|
||||||
child = g_variant_new_from_data (G_VARIANT_TYPE ("ay"), secret, n_secret, TRUE,
|
child = g_variant_new_from_data (G_VARIANT_TYPE ("ay"), secret, n_secret, TRUE,
|
||||||
secret_value_unref, secret_value_ref (value));
|
secret_value_unref, secret_value_ref (value));
|
||||||
g_variant_builder_add_value (builder, child);
|
g_variant_builder_add_value (builder, child);
|
||||||
g_variant_unref (child);
|
|
||||||
|
|
||||||
g_variant_builder_add (builder, "s", secret_value_get_content_type (value));
|
g_variant_builder_add (builder, "s", secret_value_get_content_type (value));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user