gthreadedresolver: ref-sink returned records in lookup_records()

The return value to `lookup_records()` methods is set as `transfer full`
but the code path in `g_resolver_records_from_res_query()` doesn't
sink the GVariant.

Add the `g_variant_ref_sink()` call when prepending the record, so
the list hold a full reference on each records.

closes #3393
This commit is contained in:
Andy Holmes 2024-06-13 11:43:00 -07:00
parent 07fa7b261c
commit da3510575e
No known key found for this signature in database

View File

@ -1079,7 +1079,7 @@ g_resolver_records_from_res_query (const gchar *rrname,
}
if (record != NULL)
records = g_list_prepend (records, record);
records = g_list_prepend (records, g_variant_ref_sink (record));
if (parsing_error != NULL)
break;