ofp-port: Free memory on error in ofp_print_ofpst_port_reply
Counters in ops->custom_stats may already be valid at this error point.
This patch frees the leaked memory.
Reported-at:
@@ -1679,6 +1679,7 @@ ofputil_pull_ofp14_port_stats(struct ofputil_port_stats *ops,
error = ofpprop_pull(&properties, &payload, &type);
if (error) {
+ netdev_free_custom_stats_counters(&ops->custom_stats);
return error;
}
switch (type) {
