The function always allocated a clause but didn't use it if it was
going to be a duplicate.

Signed-off-by: Ben Pfaff <b...@ovn.org>
---
 lib/ovsdb-idl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c
index ad0d1e1..7d3d328 100644
--- a/lib/ovsdb-idl.c
+++ b/lib/ovsdb-idl.c
@@ -769,7 +769,6 @@ void ovsdb_idl_condition_add_clause(struct ovsdb_idl *idl,
                                     struct ovsdb_datum *arg)
 {
     struct ovsdb_idl_table *table = ovsdb_idl_table_from_class(idl, tc);
-    struct ovsdb_idl_clause *clause = xzalloc(sizeof *clause);
     const struct ovsdb_type *type = NULL;
     struct ovsdb_idl_clause *c;
 
@@ -782,6 +781,7 @@ void ovsdb_idl_condition_add_clause(struct ovsdb_idl *idl,
         }
     }
 
+    struct ovsdb_idl_clause *clause = xzalloc(sizeof *clause);
     ovs_list_init(&clause->node);
     clause->function = function;
     clause->column = column;
-- 
2.1.3

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to