mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-14 00:17:35 +00:00
new-call-box: Fix memory leak
calls_new_call_box_dial was taking a reference it never released.
This commit is contained in:
parent
581c82fcd7
commit
ee64b33e24
1 changed files with 3 additions and 3 deletions
|
@ -74,7 +74,7 @@ get_selected_origin (CallsNewCallBox *self)
|
||||||
if (model && index >= 0)
|
if (model && index >= 0)
|
||||||
origin = g_list_model_get_item (model, index);
|
origin = g_list_model_get_item (model, index);
|
||||||
|
|
||||||
return origin;
|
return g_steal_pointer (&origin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -97,8 +97,8 @@ get_origin (CallsNewCallBox *self,
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
origin = g_list_model_get_item (model, 0);
|
origin = g_list_model_get_item (model, 0);
|
||||||
return origin;
|
|
||||||
|
|
||||||
|
return g_steal_pointer (&origin);
|
||||||
} else {
|
} else {
|
||||||
return get_selected_origin (self);
|
return get_selected_origin (self);
|
||||||
}
|
}
|
||||||
|
@ -400,7 +400,7 @@ void
|
||||||
calls_new_call_box_dial (CallsNewCallBox *self,
|
calls_new_call_box_dial (CallsNewCallBox *self,
|
||||||
const gchar *target)
|
const gchar *target)
|
||||||
{
|
{
|
||||||
CallsOrigin *origin;
|
g_autoptr (CallsOrigin) origin = NULL;
|
||||||
|
|
||||||
g_return_if_fail (CALLS_IS_NEW_CALL_BOX (self));
|
g_return_if_fail (CALLS_IS_NEW_CALL_BOX (self));
|
||||||
g_return_if_fail (target != NULL);
|
g_return_if_fail (target != NULL);
|
||||||
|
|
Loading…
Reference in a new issue