From fa7fee60cac8659b3a980a6400939a5a24e0e61e Mon Sep 17 00:00:00 2001 From: Julien Desfossez Date: Tue, 9 Dec 2014 16:38:05 -0500 Subject: [PATCH] Fix: don't destroy the sockets if the snapshot was successful MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Missing a goto to skip the error condition that was destroying the relayd sockets even if a snapshot was successful. We want to keep them open to reuse them for the next snapshots. Signed-off-by: Julien Desfossez Signed-off-by: Jérémie Galarneau --- src/bin/lttng-sessiond/cmd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index dbecc3d24..e23717263 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -2961,11 +2961,13 @@ static int record_kernel_snapshot(struct ltt_kernel_session *ksess, } ret = LTTNG_OK; + goto end; error_snapshot: /* Clean up copied sockets so this output can use some other later on. */ consumer_destroy_output_sockets(output->consumer); error: +end: return ret; } -- 2.34.1