mirror of
https://github.com/openvswitch/ovs
synced 2025-08-22 01:51:26 +00:00
ofproto-dpif-xlate: Fix memory leak in xlate_generic_encap_action().
This is not a real issue, as the initializer function, rewrite_flow_push_nsh(), ensures it returns NULL on error. However, cleaning this up improves code clarity and resolves a Coverity warning about a potential memory leak. Acked-by: Aaron Conole <aconole@redhat.com> Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
This commit is contained in:
parent
8fca3f99cf
commit
88737f02ed
@ -7055,6 +7055,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user