From 8f440555a04873dbb57ee971b64b2f661f26fef6 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Fri, 5 Feb 2021 13:43:30 +0100 Subject: [PATCH] TT#108003 Fix memory leak in cdr_update_entry() The AUTO_CLEANUP_INIT() macro is already allocating a string for this variable, which we were then overwriting and thus leaking. Change-Id: If655c867c5666c6cff6311f01e617647375f6279 Warned-by: coverity --- daemon/cdr.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/daemon/cdr.c b/daemon/cdr.c index 66589b209..71c9c7e4b 100644 --- a/daemon/cdr.c +++ b/daemon/cdr.c @@ -49,8 +49,6 @@ void cdr_update_entry(struct call* c) { if (!IS_OWN_CALL(c)) return; - cdr = g_string_new(""); - /* CDRs and statistics */ if (_log_facility_cdr) { g_string_append_printf(cdr, "ci=%s, ",c->callid.s);