[lttng-dev] [PATCH lttng-tools 2/2] Fix: don't destroy the sockets if the snapshot was successful

Jonathan Rajotte jonathan.rajotte-julien at efficios.com
Thu Feb 7 20:25:42 EST 2019


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 <jonathan.rajotte-julien at efficios.com>
---
 src/bin/lttng-sessiond/cmd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c
index d3c8376be..d91869fae 100644
--- a/src/bin/lttng-sessiond/cmd.c
+++ b/src/bin/lttng-sessiond/cmd.c
@@ -4179,10 +4179,13 @@ static enum lttng_error_code record_ust_snapshot(struct ltt_ust_session *usess,
 		goto error_snapshot;
 	}
 
+	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 status;
 }
 
-- 
2.17.1



More information about the lttng-dev mailing list