1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-12-13 07:57:36 +00:00

emergency-calls-manager: Don't leak origin

g_list_model_get_item is transfer full
This commit is contained in:
Guido Günther 2023-04-07 15:00:32 +02:00 committed by Evangelos Ribeiro Tzaras
parent 3647f8f8c2
commit b58be993a6

View file

@ -88,7 +88,7 @@ handle_get_emergency_contacts (CallsDBusEmergencyCalls *object,
g_variant_builder_init (&contacts_builder, G_VARIANT_TYPE (CONTACTS_FORMAT));
for (int i = 0; i < g_list_model_get_n_items (self->origins); i++) {
CallsOrigin *origin = g_list_model_get_item (self->origins, i);
g_autoptr (CallsOrigin) origin = g_list_model_get_item (self->origins, i);
g_auto (GStrv) emergency_numbers = NULL;
const char *country_code;