summaryrefslogtreecommitdiff
path: root/utilities
diff options
context:
space:
mode:
authorWilliam Tu <u9012063@gmail.com>2017-02-08 07:03:54 -0800
committerAndy Zhou <azhou@ovn.org>2017-02-08 15:03:52 -0800
commitedb417cc256e7d5f02f230867865c8cf7f26e542 (patch)
treed0b69903dfd743043d7962401c1f0abf3f82e236 /utilities
parentd3328b165e3ffa9e681565b386180686b10efea7 (diff)
downloadopenvswitch-edb417cc256e7d5f02f230867865c8cf7f26e542.tar.gz
ovs-ofctl: fix memory leak reported by valgrind.
Testcase 1057 ofproto-dpif - fragment handling - upcall reports the following leak: xrealloc (util.c:123) vconn_dump_flows (vconn.c:1030) read_flows_from_switch (ovs-ofctl.c:3360) ofctl_replace_flows (ovs-ofctl.c:3433) ovs_cmdl_run_command__ (command-line.c:115) Signed-off-by: William Tu <u9012063@gmail.com> Signed-off-by: Andy Zhou <azhou@ovn.org>
Diffstat (limited to 'utilities')
-rw-r--r--utilities/ovs-ofctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
index 4e1162329..77332e0f8 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -3375,6 +3375,11 @@ read_flows_from_switch(struct vconn *vconn,
fte_queue(state, &fs->match, fs->priority, version, index);
}
+
+ for (size_t i = 0; i < n_fses; i++) {
+ free(CONST_CAST(struct ofpact *, fses[i].ofpacts));
+ }
+ free(fses);
}
static void