From: Jérémie Galarneau Date: Tue, 23 Jul 2019 20:45:48 +0000 (-0400) Subject: Fix: reception buffer of control connection is leaked X-Git-Tag: v2.11.0-rc3~95 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e9b7c75317d46e1c4f8fb93afbb6ae6ed7672179;p=lttng-tools.git Fix: reception buffer of control connection is leaked The reception buffers of control connections are not "reset" on destruction, resulting in their underlying storage buffer being leaked. The typical (observed) size of the leak is 8kb per control connection. Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-relayd/connection.c b/src/bin/lttng-relayd/connection.c index eeaa0a559..cf93fb6e7 100644 --- a/src/bin/lttng-relayd/connection.c +++ b/src/bin/lttng-relayd/connection.c @@ -127,6 +127,10 @@ static void rcu_free_connection(struct rcu_head *head) viewer_session_destroy(conn->viewer_session); conn->viewer_session = NULL; } + if (conn->type == RELAY_CONTROL) { + lttng_dynamic_buffer_reset( + &conn->protocol.ctrl.reception_buffer); + } free(conn); }