Commit 5249f35d authored by Christian Hergert's avatar Christian Hergert

encoding: fix leak of variant

g_variant_parse() returns a GVariant that does not have a floating
reference. Therefore, the ref_sink() was raising the reference count to
two instead of sinking the non-existent floating ref.
parent e938da84
......@@ -668,8 +668,6 @@ gtk_source_encoding_get_default_candidates (void)
g_assert_no_error (error);
}
g_variant_ref_sink (encodings_variant);
encodings_strv = g_variant_get_strv (encodings_variant, NULL);
encodings_list = strv_to_list (encodings_strv);
g_free ((gpointer) encodings_strv);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment