Message ID | 1486566234-37570-2-git-send-email-u9012063@gmail.com |
---|---|
State | Accepted |
Headers | show |
On Wed, Feb 8, 2017 at 7:03 AM, William Tu <u9012063@gmail.com> wrote: > 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> Acked-by: Andy Zhou <azhou@ovn.org>
On Wed, Feb 08, 2017 at 11:24:28AM -0800, Andy Zhou wrote: > On Wed, Feb 8, 2017 at 7:03 AM, William Tu <u9012063@gmail.com> wrote: > > 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> > Acked-by: Andy Zhou <azhou@ovn.org> Andy, do you want to apply these?
On Wed, Feb 8, 2017 at 11:40 AM, Ben Pfaff <blp@ovn.org> wrote: > On Wed, Feb 08, 2017 at 11:24:28AM -0800, Andy Zhou wrote: >> On Wed, Feb 8, 2017 at 7:03 AM, William Tu <u9012063@gmail.com> wrote: >> > 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> >> Acked-by: Andy Zhou <azhou@ovn.org> > > Andy, do you want to apply these? Yes, pushed both patches to master and branch-2.7.
diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index 4e11623..77332e0 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
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> --- utilities/ovs-ofctl.c | 5 +++++ 1 file changed, 5 insertions(+)