telepathy-glib: protocol: fix a memory leak
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Aug 31 21:36:59 UTC 2020
Module: telepathy-glib
Branch: master
Commit: 9c6c6fb5203d8cb73064a02cc6b147aa91908952
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=9c6c6fb5203d8cb73064a02cc6b147aa91908952
Author: Ivaylo Dimitrov <ivo.g.dimitrov.75 at gmail.com>
Date: Thu Aug 27 13:31:03 2020 +0300
protocol: fix a memory leak
Signed-off-by: Ivaylo Dimitrov <ivo.g.dimitrov.75 at gmail.com>
---
telepathy-glib/protocol.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/telepathy-glib/protocol.c b/telepathy-glib/protocol.c
index b63730cd1..88fdff382 100644
--- a/telepathy-glib/protocol.c
+++ b/telepathy-glib/protocol.c
@@ -1791,7 +1791,7 @@ _tp_protocol_parse_manager_file (GKeyFile *file,
i++;
}
- param_specs = g_ptr_array_sized_new (i);
+ param_specs = g_ptr_array_new_full (i, tp_value_array_free);
for (key = keys; key != NULL && *key != NULL; key++)
{
@@ -1886,6 +1886,8 @@ _tp_protocol_parse_manager_file (GKeyFile *file,
TP_PROP_PROTOCOL_PARAMETERS, TP_ARRAY_TYPE_PARAM_SPEC_LIST, param_specs,
NULL);
+ g_ptr_array_unref(param_specs);
+
tp_asv_take_boxed (immutables, TP_PROP_PROTOCOL_INTERFACES, G_TYPE_STRV,
g_key_file_get_string_list (file, group, "Interfaces", NULL, NULL));
tp_asv_take_boxed (immutables, TP_PROP_PROTOCOL_CONNECTION_INTERFACES,
More information about the telepathy-commits
mailing list