From 015b2a9bc821b9ef750b27974e60810b2d0919b5 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 13 Feb 2015 11:54:13 -0500 Subject: [PATCH] legacy tcp protocol fix --- daemon/call_interfaces.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon/call_interfaces.c b/daemon/call_interfaces.c index ff82e153b..e4a0dd6bc 100644 --- a/daemon/call_interfaces.c +++ b/daemon/call_interfaces.c @@ -222,7 +222,7 @@ str *call_lookup_udp(char **out, struct callmaster *m) { static int info_parse_func(char **a, void **ret, void *p) { GHashTable *ih = p; - g_hash_table_replace(ih, a[0], a[1]); + g_hash_table_replace(ih, strdup(a[0]), strdup(a[1])); return -1; } @@ -301,7 +301,7 @@ static str *call_request_lookup_tcp(char **out, struct callmaster *m, enum call_ GHashTable *infohash; str_init(&callid, out[RE_TCP_RL_CALLID]); - infohash = g_hash_table_new(g_str_hash, g_str_equal); + infohash = g_hash_table_new_full(g_str_hash, g_str_equal, free, free); c = call_get_opmode(&callid, m, opmode); if (!c) { ilog(LOG_WARNING, "["STR_FORMAT"] Got LOOKUP for unknown call-id", STR_FMT(&callid));