Found by Coverity:
CID
1376168 (#1 of 1): Dereference after null check (FORWARD_NULL)7.
var_deref_model: Passing null pointer
debug_info_component->arg_debug_info_field_name to sprintf, which
dereferences it.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
if (!debug_info_component->arg_debug_info_field_name) {
ret = BT_COMPONENT_STATUS_NOMEM;
BT_LOGE_STR("Missing field name.");
+ goto end;
}
sprintf(debug_info_component->arg_debug_info_field_name,
"debug_info");