From e6c928e5f4b111804bdf6ed2440601bb4e2f51e0 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 14 Sep 2026 08:00:12 -0400 Subject: [PATCH] MT#55283 lightweight transform strings Change-Id: Iefad364cc6cbabd00f94ec274830178ad9875127 --- daemon/codec.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/daemon/codec.c b/daemon/codec.c index c4a794075..9666e5fbf 100644 --- a/daemon/codec.c +++ b/daemon/codec.c @@ -429,6 +429,9 @@ static void __transform_handler_destroy(struct transform_handler *tfh) { if (!ret || !(result = bencode_dictionary_get_str(ret, "result")).len || str_cmp(&result, "ok")) ilog(LOG_WARN, "Failed to delete remote 'transform' session"); } + + memory_arena_free_lw(tfh->call_id.s); + memory_arena_free_lw(tfh->tag.s); } static void __handler_shutdown(struct codec_handler *handler) { @@ -711,12 +714,12 @@ static const char *__make_transform_handler(struct codec_handler *handler) { str s = bencode_dictionary_get_str(ret, "call-id"); if (!s.len) return "'transform' response didn't contain 'call-id'"; - tfh->call_id = call_str_cpy(&s); + memory_arena_str_cpy_free(&tfh->call_id, &s); s = bencode_dictionary_get_str(ret, "from-tag"); if (!s.len) return "'transform' response didn't contain 'from-tag'"; - tfh->tag = call_str_cpy(&s); + memory_arena_str_cpy_free(&tfh->tag, &s); __auto_type remote_media = bencode_dictionary_get_expect(ret, "media", BENCODE_LIST); if (!remote_media)