diff options
author | William Tu <u9012063@gmail.com> | 2017-02-08 07:03:54 -0800 |
---|---|---|
committer | Andy Zhou <azhou@ovn.org> | 2017-02-08 15:03:52 -0800 |
commit | edb417cc256e7d5f02f230867865c8cf7f26e542 (patch) | |
tree | d0b69903dfd743043d7962401c1f0abf3f82e236 /utilities | |
parent | d3328b165e3ffa9e681565b386180686b10efea7 (diff) | |
download | openvswitch-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.c | 5 |
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 |