From: Mathieu Desnoyers Date: Thu, 3 Aug 2017 15:59:37 +0000 (-0400) Subject: Fix: unchecked return value of bt_value_array_append_string X-Git-Tag: v2.0.0-pre4~164 X-Git-Url: https://git.efficios.com/?a=commitdiff_plain;h=744378af335a7ba524b16052f88f7655a62135a8;p=babeltrace.git Fix: unchecked return value of bt_value_array_append_string 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 Signed-off-by: Jérémie Galarneau --- diff --git a/cli/babeltrace-cfg.c b/cli/babeltrace-cfg.c index 021cca49..772cd5a5 100644 --- a/cli/babeltrace-cfg.c +++ b/cli/babeltrace-cfg.c @@ -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: