Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9972
Signed-off-by: Ben Pfaff <[email protected]>
---
lib/ofp-port.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/ofp-port.c b/lib/ofp-port.c
index 8d882a14b4df..f19beb64a04c 100644
--- a/lib/ofp-port.c
+++ b/lib/ofp-port.c
@@ -1618,6 +1618,7 @@ parse_intel_port_custom_property(struct ofpbuf *payload,
uint8_t *name_len = ofpbuf_try_pull(payload, sizeof *name_len);
char *name = name_len ? ofpbuf_try_pull(payload, *name_len) : NULL;
if (!name_len || !name) {
+ free(ops->custom_stats.counters);
return OFPERR_OFPBPC_BAD_LEN;
}
@@ -1628,6 +1629,7 @@ parse_intel_port_custom_property(struct ofpbuf *payload,
/* Counter value. */
ovs_be64 *value = ofpbuf_try_pull(payload, sizeof *value);
if (!value) {
+ free(ops->custom_stats.counters);
return OFPERR_OFPBPC_BAD_LEN;
}
c->value = ntohll(get_unaligned_be64(value));
--
2.16.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev