Ensure that xlate_generic_encap_action() does not return a buffer on error.
Signed-off-by: Eelco Chaudron <[email protected]> -- v2: - Made sure no buffer is returned on error. --- ofproto/ofproto-dpif-xlate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c index 4cc7001a5..e59ff17ad 100644 --- a/ofproto/ofproto-dpif-xlate.c +++ b/ofproto/ofproto-dpif-xlate.c @@ -6938,7 +6938,8 @@ rewrite_flow_push_nsh(struct xlate_ctx *ctx, "supported for packet type (%d,0x%x)", pt_ns(packet_type), pt_ns_type(packet_type)); ctx->error = XLATE_UNSUPPORTED_PACKET_TYPE; - return buf; + ofpbuf_delete(buf); + return NULL; } /* Note that we have matched on packet_type! */ wc->masks.packet_type = OVS_BE32_MAX; -- 2.47.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
