From fc246e64d3ff4b2cb6d03c63dd274d7bbbc31a29 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 8 Feb 2013 13:15:12 -0500 Subject: [PATCH] cant guarantee that the call struct is still valid when the response is sent, to copy strings --- daemon/call.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/call.c b/daemon/call.c index bcaa52e23..d70962caa 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2399,7 +2399,7 @@ static bencode_item_t *peer_stats(bencode_buffer_t *b, struct peer *p) { d = bencode_dictionary(b); - bencode_dictionary_add_str(d, "tag", &p->tag); + bencode_dictionary_add_str_dup(d, "tag", &p->tag); if (p->codec) bencode_dictionary_add_string(d, "codec", p->codec); if (p->kernelized)