From d8f48b249f7b05de04eada78d28b630d3783f827 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Thu, 7 Feb 2019 20:25:42 -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. This is verbatim from the fix 1371fc1228461eb532118280e67ab3e9de015757 It is also the same fix. Signed-off-by: Jonathan Rajotte 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 91040ec1e..16f4849bc 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -3846,11 +3846,13 @@ static int record_ust_snapshot(struct ltt_ust_session *usess, } 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