[calls] best-match: Fix potential memory leak
- From: Evangelos Ribeiro Tzaras <devrtz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [calls] best-match: Fix potential memory leak
- Date: Thu, 20 Jan 2022 10:50:29 +0000 (UTC)
commit c594726ce5bb99bcaa6b99578e9b0a5cf689468b
Author: Evangelos Ribeiro Tzaras <devrtz fortysixandtwo eu>
Date: Thu Jan 13 17:19:46 2022 +0100
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.
src/calls-best-match.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/src/calls-best-match.c b/src/calls-best-match.c
index 29548258..a130f33e 100644
--- a/src/calls-best-match.c
+++ b/src/calls-best-match.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]