From a9d36096fd1bfbeb7c55a5cfc97523512237f0d4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Tue, 27 Aug 2019 16:46:36 -0400 Subject: [PATCH] Use case-scope error labels handling LTTNG_CONSUMER_DESTROY_CHANNEL MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This cleans-up the error handling of the case handling the LTTNG_CONSUMER_DESTROY_CHANNEL command. This is done in order to allow a follow-up commit to perform some common clean-up operations on error while introducing as few changes as possible. No behaviour change is intended. Signed-off-by: Jérémie Galarneau --- src/common/kernel-consumer/kernel-consumer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/kernel-consumer/kernel-consumer.c b/src/common/kernel-consumer/kernel-consumer.c index 95c92ba9b..196da6633 100644 --- a/src/common/kernel-consumer/kernel-consumer.c +++ b/src/common/kernel-consumer/kernel-consumer.c @@ -979,14 +979,14 @@ error_streams_sent_nosignal: ret = consumer_send_status_msg(sock, ret_code); if (ret < 0) { /* Somehow, the session daemon is not responding anymore. */ - goto end_nosignal; + goto end_destroy_channel; } health_code_update(); /* Stop right now if no channel was found. */ if (!channel) { - goto end_nosignal; + goto end_destroy_channel; } /* @@ -1002,7 +1002,7 @@ error_streams_sent_nosignal: assert(!uatomic_sub_return(&channel->refcount, 1)); consumer_del_channel(channel); - +end_destroy_channel: goto end_nosignal; } case LTTNG_CONSUMER_DISCARDED_EVENTS: -- 2.34.1