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 <u9012...@gmail.com>
---
 utilities/ovs-ofctl.c | 5 +++++
 1 file changed, 5 insertions(+)

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
-- 
2.7.4

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to