summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYifeng Sun <pkusunyifeng@gmail.com>2018-10-18 14:10:47 -0700
committerBen Pfaff <blp@ovn.org>2018-10-23 09:27:10 -0700
commite9c363ee1a3dbf59ed3e15cd848ccecbc07522cb (patch)
tree514f63e77656c02187d696988914e1bbc8aa6c02
parentbafb398bf6df8d5542fa41762ef68fe0df618b84 (diff)
downloadopenvswitch-e9c363ee1a3dbf59ed3e15cd848ccecbc07522cb.tar.gz
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: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10322 Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
-rw-r--r--lib/ofp-port.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ofp-port.c b/lib/ofp-port.c
index 3d1ada9ce..15dac4f0a 100644
--- a/lib/ofp-port.c
+++ b/lib/ofp-port.c
@@ -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) {