If parse_ofp_flow_mod_str returns no error, ofputil_flow_mod.match
contains allocated memory that should be free. This patch fixes it.

Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11343
Signed-off-by: Yifeng Sun <[email protected]>
---
 tests/oss-fuzz/ofctl_parse_target.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/oss-fuzz/ofctl_parse_target.c 
b/tests/oss-fuzz/ofctl_parse_target.c
index db86c7da1ab3..d4712a442477 100644
--- a/tests/oss-fuzz/ofctl_parse_target.c
+++ b/tests/oss-fuzz/ofctl_parse_target.c
@@ -62,6 +62,7 @@ ofctl_parse_flow(const char *input, int command)
         free(error);
     } else {
         ofctl_parse_flows__(&fm, 1, usable_protocols);
+        minimatch_destroy(&fm.match);
     }
 }
 
-- 
2.7.4

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

Reply via email to