Fix: unchecked lttng_dynamic_buffer_set_size return value
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 6 May 2017 18:29:19 +0000 (14:29 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 6 May 2017 18:30:19 +0000 (14:30 -0400)
Reported-by: Coverity Scan
*** CID 1374796:  Error handling issues  (CHECKED_RETURN)

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/lib/lttng-ctl/channel.c

index 75a911f2af3ec7080085c648792d23393f82ad1c..5bfb75902e2ff98155884208668125ecd9db1799 100644 (file)
@@ -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;
 }
 
This page took 0.025664 seconds and 4 git commands to generate.