Coverity reported the following:
CID
1401191 (#1 of 1): Logically dead code (DEADCODE)dead_error_begin:
Execution cannot reach this statement: bt_ctf_field_wrapper_destroy.
Reported-by: Coverity - 1401191 Logically dead code (DEADCODE)
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: Ib468f8df4a11491b185ffa45c2db3bc4fc8fb045
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2051
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Simon Marchi <simon.marchi@efficios.com>
field_wrapper = bt_ctf_object_pool_create_object(pool);
if (!field_wrapper) {
BT_LOGE("Cannot allocate one field wrapper");
- goto error;
+ goto end;
}
BT_ASSERT(field_wrapper->field);
- goto end;
-
-error:
- if (field_wrapper) {
- bt_ctf_field_wrapper_destroy(field_wrapper);
- field_wrapper = NULL;
- }
end:
return field_wrapper;