diff mbox series

[ovs-dev,02/14] test-ovn: Fix expression leak.

Message ID 20201120001724.2424494-3-i.maximets@ovn.org
State Accepted
Headers show
Series Pack of fixes for memory leaks. | expand

Commit Message

Ilya Maximets Nov. 20, 2020, 12:17 a.m. UTC
No need to clone when assigning to the same variable.

Fixes: 024500aeab9a ("expr: Evaluate the condition expression in a separate step.")
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
---
 tests/test-ovn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/test-ovn.c b/tests/test-ovn.c
index 74b5a3384..18c675303 100644
--- a/tests/test-ovn.c
+++ b/tests/test-ovn.c
@@ -919,7 +919,7 @@  test_tree_shape_exhaustively(struct expr *expr, struct shash *symtab,
         } else if (operation >= OP_SIMPLIFY) {
             modified = expr_simplify(expr_clone(expr));
             modified = expr_evaluate_condition(
-                expr_clone(modified), tree_shape_is_chassis_resident_cb,
+                modified, tree_shape_is_chassis_resident_cb,
                 NULL, NULL);
             ovs_assert(expr_honors_invariants(modified));