From e4f3498e493f36ac06233fa27229a71567ada3a4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Sat, 6 May 2017 14:29:19 -0400 Subject: [PATCH] Fix: unchecked lttng_dynamic_buffer_set_size return value MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reported-by: Coverity Scan *** CID 1374796: Error handling issues (CHECKED_RETURN) Signed-off-by: Jérémie Galarneau --- src/lib/lttng-ctl/channel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/lttng-ctl/channel.c b/src/lib/lttng-ctl/channel.c index 75a911f2a..5bfb75902 100644 --- a/src/lib/lttng-ctl/channel.c +++ b/src/lib/lttng-ctl/channel.c @@ -81,7 +81,9 @@ int receive_message(struct lttng_notification_channel *channel) end: return ret; error: - lttng_dynamic_buffer_set_size(&channel->reception_buffer, 0); + if (lttng_dynamic_buffer_set_size(&channel->reception_buffer, 0)) { + ret = -1; + } goto end; } -- 2.34.1