ofproto: Make valgrind happy.
authorBen Pfaff <blp@nicira.com>
Wed, 7 Apr 2010 22:27:35 +0000 (15:27 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 20 Apr 2010 18:01:44 +0000 (11:01 -0700)
The "flags" member of struct odp_flow is not used for adding or deleting
flows, but valgrind doesn't know that.  By zeroing it out we can suppress
spurious warnings.

ofproto/ofproto.c

index 995e6b0fe9e256936b4f7ffa05beef5aeb308172..0746bc9836175920d5adc1b2188ef457b19cc4ec 100644 (file)
@@ -1669,6 +1669,7 @@ do_put_flow(struct ofproto *ofproto, struct rule *rule, int flags,
     put->flow.key = rule->cr.flow;
     put->flow.actions = rule->odp_actions;
     put->flow.n_actions = rule->n_odp_actions;
+    put->flow.flags = 0;
     put->flags = flags;
     return dpif_flow_put(ofproto->dpif, put);
 }
@@ -1764,6 +1765,7 @@ rule_uninstall(struct ofproto *p, struct rule *rule)
         odp_flow.key = rule->cr.flow;
         odp_flow.actions = NULL;
         odp_flow.n_actions = 0;
+        odp_flow.flags = 0;
         if (!dpif_flow_del(p->dpif, &odp_flow)) {
             update_stats(p, rule, &odp_flow.stats);
         }