Fix: unchecked return value of bt_value_array_append_string
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 3 Aug 2017 15:59:37 +0000 (11:59 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 9 Aug 2017 21:55:52 +0000 (17:55 -0400)
CID 1376147 (#1 of 1): Unchecked return value (CHECKED_RETURN).
check_return: Calling bt_value_array_append_string without checking
return value (as is done elsewhere 49 out of 50 times).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
cli/babeltrace-cfg.c

index 021cca490b92cc22baa1b33465c28033885eceaa..772cd5a5a9f58083502517162db6ede76f7b80b1 100644 (file)
@@ -59,7 +59,10 @@ enum bt_value_status bt_config_append_plugin_paths(
        for (i = 0; i < dirs->len; i++) {
                GString *dir = g_ptr_array_index(dirs, i);
 
-               bt_value_array_append_string(plugin_paths, dir->str);
+               status = bt_value_array_append_string(plugin_paths, dir->str);
+               if (status != BT_VALUE_STATUS_OK) {
+                       break;
+               }
        }
 
 end:
This page took 0.024992 seconds and 4 git commands to generate.