From: Jérémie Galarneau Date: Mon, 5 Jul 2021 18:25:40 +0000 (-0400) Subject: Clean-up: event-expr: remove unreachable code X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a0f5397156d57d1bf01794b00369ae7ec94267ed;p=lttng-tools.git Clean-up: event-expr: remove unreachable code 1452699 Logically dead code The indicated dead code may have performed some action; that action will never occur. In lttng_event_expr_array_field_element_create: Code can never be reached because of a logical contradiction (CWE-561) Reported-by: Coverity Scan Signed-off-by: Jérémie Galarneau Change-Id: I301e73c8e0cc7b9c4fb889e5bf7ef30d6ecf7d9f --- diff --git a/src/common/event-expr/event-expr.c b/src/common/event-expr/event-expr.c index c3709c882..c41987e1d 100644 --- a/src/common/event-expr/event-expr.c +++ b/src/common/event-expr/event-expr.c @@ -188,9 +188,6 @@ struct lttng_event_expr *lttng_event_expr_array_field_element_create( goto end; error: - if (expr) { - lttng_event_expr_destroy(&expr->parent); - } ret_parent_expr = NULL; end: