Clean-up: event-expr: remove unreachable code
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 5 Jul 2021 18:25:40 +0000 (14:25 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 6 Jul 2021 21:48:04 +0000 (17:48 -0400)
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 <jeremie.galarneau@efficios.com>
Change-Id: I301e73c8e0cc7b9c4fb889e5bf7ef30d6ecf7d9f

src/common/event-expr/event-expr.c

index c3709c882cfc72c2b7efcd3518ae414be686bc26..c41987e1ddb3247cc7da6cc945c925915314d8ad 100644 (file)
@@ -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:
This page took 0.027258 seconds and 4 git commands to generate.