summaryrefslogtreecommitdiff
path: root/ovn
diff options
context:
space:
mode:
authorWilliam Tu <u9012063@gmail.com>2016-02-11 09:45:07 -0800
committerRussell Bryant <russell@ovn.org>2016-02-11 15:29:20 -0500
commit1cad4a759cbeb201f16052f866737ad64243998a (patch)
tree916ca3eee856a1c4da34da5fb71ba7c98c78c0b4 /ovn
parent7b383a56a76e2496f630bcfbc8f9b46f82c62081 (diff)
downloadopenvswitch-1cad4a759cbeb201f16052f866737ad64243998a.tar.gz
expr: Fix memory leak reported by valgrind.
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> Signed-off-by: Russell Bryant <russell@ovn.org>
Diffstat (limited to 'ovn')
-rw-r--r--ovn/lib/expr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ovn/lib/expr.c b/ovn/lib/expr.c
index f30500e89..316d55701 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);
}