From: David Goulet Date: Wed, 5 Feb 2014 21:37:46 +0000 (-0500) Subject: Fix: free viewer session in connection_free() X-Git-Tag: v2.4.0-rc5~32 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5fa23e49ffdbf8e29a3d8c3406f9d00c748863e1;p=lttng-tools.git Fix: free viewer session in connection_free() Signed-off-by: David Goulet --- diff --git a/src/bin/lttng-relayd/connection.c b/src/bin/lttng-relayd/connection.c index 28d0cb311..f8315449a 100644 --- a/src/bin/lttng-relayd/connection.c +++ b/src/bin/lttng-relayd/connection.c @@ -28,8 +28,7 @@ static void rcu_free_connection(struct rcu_head *head) caa_container_of(head, struct relay_connection, rcu_node); lttcomm_destroy_sock(conn->sock); - free(conn->viewer_session); - free(conn); + connection_free(conn); } struct relay_connection *connection_find_by_sock(struct lttng_ht *ht, int sock) @@ -108,5 +107,6 @@ void connection_free(struct relay_connection *conn) { assert(conn); + free(conn->viewer_session); free(conn); }