Found by Coverity:
CID
1376155 (#1 of 1): Unchecked return value (CHECKED_RETURN).
check_return: Calling bt_value_string_get without checking return value
(as is done elsewhere 44 out of 47 times).
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
struct bt_value *plugin_path_value = NULL;
const char *plugin_path;
struct bt_plugin_set *plugin_set;
+ enum bt_value_status status;
plugin_path_value = bt_value_array_get(plugin_paths, i);
- bt_value_string_get(plugin_path_value, &plugin_path);
- assert(plugin_path);
+ status = bt_value_string_get(plugin_path_value, &plugin_path);
+ if (status != BT_VALUE_STATUS_OK) {
+ BT_LOGD_STR("Cannot get plugin path string.");
+ BT_PUT(plugin_path_value);
+ continue;
+ }
/*
* Skip this if the directory does not exist because