From: Jonathan Rajotte Date: Fri, 8 Feb 2019 01:25:42 +0000 (-0500) Subject: Fix: don't destroy the sockets if the snapshot was successful X-Git-Tag: v2.9.12~20 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=5748df44d1f75f9baf5e524e2f13367ce09b83ea Fix: don't destroy the sockets if the snapshot was successful 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 --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index cf30b8ebf..97ed8985b 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -3755,11 +3755,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; }