When ofputil_decode_port_stats returns error, it is possible that custom_stats_counters is valid and still need freed.
The fuzz report link is https://oss-fuzz.com/testcase?key=5739356233400320 Signed-off-by: Yifeng Sun <[email protected]> --- lib/ofp-print.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ofp-print.c b/lib/ofp-print.c index e05a969a82b0..37d7b8b98c55 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -558,6 +558,7 @@ ofp_print_ofpst_port_reply(struct ds *string, const struct ofp_header *oh, retval = ofputil_decode_port_stats(&ps, &b); if (retval) { + netdev_free_custom_stats_counters(&ps.custom_stats); return retval != EOF ? retval : 0; } ofputil_format_port_stats(string, &ps, port_map); -- 2.7.4 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
