Test case: ovs-ofctl replace-flows with --bundle(376) reports two leaks:
    ofpbuf_new(ofpbuf.c:151)
    ofpraw_alloc_xid(ofp-msgs.c:533)
    ofpraw_alloc(ofp-msgs.c:525)
    ofputil_encode_flow_mod(ofp-util.c:2290)
    bundle_flow_mod__(ovs-ofctl.c:1312)
    ofctl_flow_mod__(ovs-ofctl.c:1331)
    ofctl_flow_mod_file.isra.13(ovs-ofctl.c:1365)
    ovs_cmdl_run_command(command-line.c:121)
    main(ovs-ofctl.c:135)
and
    ofpraw_alloc(ofp-msgs.c:525)
    ofputil_encode_flow_mod(ofp-util.c:2290)
    fte_make_flow_mod(ovs-ofctl.c:2936)
    ofctl_replace_flows(ovs-ofctl.c:2981)
    ovs_cmdl_run_command(command-line.c:121)
    main(ovs-ofctl.c:135)

Signed-off-by: William Tu <u9012...@gmail.com>
Signed-off-by: Daniele Di Proietto <diproiet...@vmware.com>
Co-authored-by: Daniele Di Proietto <diproiet...@vmware.com>
---
 utilities/ovs-ofctl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
index 4ab83b9..70f1440 100644
--- a/utilities/ovs-ofctl.c
+++ b/utilities/ovs-ofctl.c
@@ -1316,6 +1316,7 @@ bundle_flow_mod__(const char *remote, struct 
ofputil_flow_mod *fms,
     }
 
     bundle_transact(vconn, &requests, OFPBF_ORDERED | OFPBF_ATOMIC);
+    ofpbuf_list_delete(&requests);
     vconn_close(vconn);
 }
 
@@ -2981,6 +2982,8 @@ ofctl_replace_flows(struct ovs_cmdl_context *ctx)
     } else {
         transact_multiple_noreply(vconn, &requests);
     }
+
+    ofpbuf_list_delete(&requests);
     vconn_close(vconn);
 
     fte_free_all(&tables);
-- 
2.5.0

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to