From: Jérémie Galarneau Date: Sat, 6 May 2017 18:29:19 +0000 (-0400) Subject: Fix: unchecked lttng_dynamic_buffer_set_size return value X-Git-Tag: v2.11.0-rc1~611 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e4f3498e493f36ac06233fa27229a71567ada3a4;p=lttng-tools.git Fix: unchecked lttng_dynamic_buffer_set_size return value Reported-by: Coverity Scan *** CID 1374796: Error handling issues (CHECKED_RETURN) Signed-off-by: Jérémie Galarneau --- 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; }