[ovs-dev] [PATCH v2 06/21] expr: Initialize 'relop' of allocated exprs in crush_and_string().
Ben Pfaff
blp at ovn.org
Mon Aug 8 16:14:17 UTC 2016
Every relop at this point is always EXPR_R_EQ, and therefore it seems that
no code actually examined it, so this doesn't appear to fix an existing
bug, but some code I was working on was affected by the uninitialized
member.
Signed-off-by: Ben Pfaff <blp at ovn.org>
---
ovn/lib/expr.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/ovn/lib/expr.c b/ovn/lib/expr.c
index a28684b..86ea75a 100644
--- a/ovn/lib/expr.c
+++ b/ovn/lib/expr.c
@@ -1802,6 +1802,7 @@ crush_and_string(struct expr *expr, const struct expr_symbol *symbol)
SSET_FOR_EACH (string, &result) {
sub = xmalloc(sizeof *sub);
sub->type = EXPR_T_CMP;
+ sub->cmp.relop = EXPR_R_EQ;
sub->cmp.symbol = symbol;
sub->cmp.string = xstrdup(string);
ovs_list_push_back(&expr->andor, &sub->node);
--
2.1.3
More information about the dev
mailing list