From: Julien Desfossez Date: Tue, 9 Dec 2014 21:38:05 +0000 (-0500) Subject: Fix: don't destroy the sockets if the snapshot was successful X-Git-Tag: v2.4.3~1 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=20da94cc6302449fbbd5328dba6ec892da91b796;p=lttng-tools.git 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. Signed-off-by: Julien Desfossez Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/cmd.c b/src/bin/lttng-sessiond/cmd.c index f18974b38..26e8d152c 100644 --- a/src/bin/lttng-sessiond/cmd.c +++ b/src/bin/lttng-sessiond/cmd.c @@ -2866,11 +2866,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; }