In testcase "tunnel - Geneve metadata", valgrind reports a memory leak with
the following call stack.
    xcalloc (util.c:95)
    tun_metadata_alloc (tun-metadata.c:89)
    tun_metadata_table_mod (tun-metadata.c:175)
    handle_tlv_table_mod (ofproto.c:7856)
    handle_openflow__ (ofproto.c:8036)
    handle_openflow (ofproto.c:8098)
    ofconn_run (connmgr.c:1427)
    connmgr_run (connmgr.c:363)
    ofproto_run (ofproto.c:1815)
    bridge_run__ (bridge.c:2915)
    bridge_run (bridge.c:2972)
    main (ovs-vswitchd.c:111)

Signed-off-by: Yi-Hung Wei <[email protected]>
---
 ofproto/ofproto.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index 84ea95b0c2a2..e8ba8496ab66 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -7862,6 +7862,8 @@ handle_tlv_table_mod(struct ofconn *ofconn, const struct 
ofp_header *oh)
         if (!error) {
             ovsrcu_set(&ofproto->metadata_tab, new_tab);
             tun_metadata_postpone_free(old_tab);
+        } else {
+            tun_metadata_free(new_tab);
         }
     }
 
-- 
2.7.4

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to