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
On ctx->error free the allocated encap_data.

Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
  • Loading branch information
chaudron authored and ovsrobot committed Feb 5, 2025
1 parent 2c8b28e commit 6a51b45
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ofproto/ofproto-dpif-xlate.c
Original file line number Diff line number Diff line change
Expand Up @@ -7007,6 +7007,8 @@ xlate_generic_encap_action(struct xlate_ctx *ctx,
/* The actual encap datapath action will be generated at next commit. */
ctx->pending_encap = true;
ctx->encap_data = encap_data;
} else {
ofpbuf_delete(encap_data);
}
}

Expand Down

0 comments on commit 6a51b45

Please sign in to comment.