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

emergency-calls-manager: Don't leak origin

g_list_model_get_item is transfer full
This commit is contained in:
Evangelos Ribeiro Tzaras 2023-04-09 11:32:10 +02:00
parent 0de7599567
commit 36fdbc28e6

View file

@ -52,7 +52,7 @@ on_origins_changed (CallsEmergencyCallsManger *self,
g_assert (CALLS_IS_EMERGENCY_CALLS_MANAGER (self));
for (int i = 0; i < added; i++) {
CallsOrigin *origin = g_list_model_get_item (self->origins, position + i);
g_autoptr (CallsOrigin) origin = g_list_model_get_item (self->origins, position - i);
g_signal_connect_object (origin, "notify::emergency-numbers",
G_CALLBACK (on_emergency_numbers_changed),