Skip to content

Commit

Permalink
ofproto-dpif-xlate: Fix memory leak in xlate_generic_encap_action().
Browse files Browse the repository at this point in the history
Ensure that xlate_generic_encap_action() does not return a buffer
on error.

Acked-by: Mike Pattrick <mkp@redhat.com>
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
  • Loading branch information
chaudron committed Feb 10, 2025
1 parent 1198632 commit d386b55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ofproto/ofproto-dpif-xlate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d386b55

Please sign in to comment.