mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-13 16:07:36 +00:00
best-match: Fix potential memory leak
We would leak memory if calls_best_match_set_phone_number would be called a second time with a SIP address.
This commit is contained in:
parent
ebc5e584bb
commit
c594726ce5
1 changed files with 1 additions and 0 deletions
|
@ -322,6 +322,7 @@ calls_best_match_set_phone_number (CallsBestMatch *self,
|
|||
if (g_str_has_prefix (self->phone_number, "sip")) {
|
||||
g_auto (GStrv) split = g_strsplit_set (self->phone_number, ":@", -1);
|
||||
|
||||
g_free (self->name_sip);
|
||||
self->name_sip = g_strdup (split[1]);
|
||||
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_PHONE_NUMBER]);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue