ovs-ofctl: Fix use-after-free error.
authorBen Pfaff <blp@nicira.com>
Mon, 16 Jul 2012 17:23:58 +0000 (10:23 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 16 Jul 2012 20:58:35 +0000 (13:58 -0700)
commit296ed880132c5d3f20d84b1ffea9959d8d6be76b
tree7a67fb40019f189aacf7739cc0eacf7e076d1270
parent5d03d2a76510db1d22779154904bc23d12b297e7
ovs-ofctl: Fix use-after-free error.

Commit 4ce9c31573 (ovs-ofctl: Factor code out of read_flows_from_switch().)
introduced a use-after-free error, fixed by this change.

Also adds a unit test for "ovs-ofctl diff-flows" that would have found the
problem.  (The bug report cited "diff-flows" but this bug was present in
dump-flows as well because they share common code.)

Bug #12461.
Reported-by: James Schmidt <jschmidt@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
tests/ovs-ofctl.at
utilities/ovs-ofctl.c