diff mbox

[ovs-dev,1/2] expr: Fix memory leak reported by valgrind.

Message ID 1455212708-22061-1-git-send-email-u9012063@gmail.com
State Not Applicable
Headers show

Commit Message

William Tu Feb. 11, 2016, 5:45 p.m. UTC
Testcase 1728: ovn -- 5-term mixed expression normalization
Call stack:
    sset_add__ (sset.c:53)
    crush_and_string (expr.c:1725)
    crush_cmps (expr.c:1998)
    expr_sort (expr.c:2050)
    expr_normalize_and (expr.c:2085)

Signed-off-by: William Tu <u9012063@gmail.com>
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Co-authored-by: Daniele Di Proietto <diproiettod@vmware.com>
---
 ovn/lib/expr.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/ovn/lib/expr.c b/ovn/lib/expr.c
index f30500e..316d557 100644
--- a/ovn/lib/expr.c
+++ b/ovn/lib/expr.c
@@ -1749,6 +1749,7 @@  crush_and_string(struct expr *expr, const struct expr_symbol *symbol)
         sub->cmp.string = xstrdup(string);
         list_push_back(&expr->andor, &sub->node);
     }
+    sset_destroy(&result);
     return expr_fix(expr);
 }