On Fri, 29 Aug 2025 at 04:22, Yunjian Wang via dev
<[email protected]> wrote:
>
> The error paths should release any allocated resources.
>
> Found by Coverity.
>
> Fixes: c1a5d0e2b573 ("netdev-offload-dpdk: Support IPv4 fragmentation types.")
> Signed-off-by: Yunjian Wang <[email protected]>
> ---
>  lib/netdev-offload-dpdk.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c
> index 6ca271489..07f60106c 100644
> --- a/lib/netdev-offload-dpdk.c
> +++ b/lib/netdev-offload-dpdk.c
> @@ -1526,6 +1526,8 @@ parse_flow_match(struct netdev *netdev,
>              } else {
>                  VLOG_WARN_RL(&rl, "Unknown IPv4 frag (0x%x/0x%x)",
>                               match->flow.nw_frag, match->wc.masks.nw_frag);
> +                free(spec);
> +                free(mask);
>                  return -1;
>              }
>              consumed_masks->nw_frag = 0;
> @@ -1609,6 +1611,8 @@ parse_flow_match(struct netdev *netdev,
>              } else {
>                  VLOG_WARN_RL(&rl, "Unknown IPv6 frag (0x%x/0x%x)",
>                               match->flow.nw_frag, match->wc.masks.nw_frag);
> +                free(frag_spec);
> +                free(frag_mask);
>                  return -1;
>              }
>

Maybe update the commit title as flagged by checkpatch (for example
"netdev-offload-dpdk: Fix memory leak for matching fragments").

Otherwise the fix lgtm.
Reviewed-by: David Marchand <[email protected]>


-- 
David Marchand

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to