From a78ca7e8de70d8d0c39bb9b755b754d965ae1ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Fri, 7 Apr 2023 15:00:32 +0200 Subject: [PATCH] emergency-calls-manager: Don't leak origin g_list_model_get_item is transfer full --- src/calls-emergency-calls-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calls-emergency-calls-manager.c b/src/calls-emergency-calls-manager.c index 937fbf1..a2f7cf1 100644 --- a/src/calls-emergency-calls-manager.c +++ b/src/calls-emergency-calls-manager.c @@ -72,7 +72,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; emergency_numbers = calls_origin_get_emergency_numbers (origin);