On 30/08/2025 07:26, Yunjian Wang via dev wrote:
> The error paths should release any allocated resources.

In this function we only need to free allocations that are not added to
patterns, so added "...that are not added to the patterns."

> 
> Found by Coverity.
> 
> Fixes: c1a5d0e2b573 ("netdev-offload-dpdk: Support IPv4 fragmentation types.")

Also,
Fixes: 1318929f904c ("netdev-offload-dpdk: Support IPv6 fragmentation
types.")

> Signed-off-by: Yunjian Wang <[email protected]>
> Reviewed-by: David Marchand <[email protected]>
> ---
> v2: Update commit title suggested by David Marchand
> ---
>  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;
>              }
>  

Thanks Yunjian, Eli and David. Modified the commit message as above and
pushed to main and branches down to branch-3.3.

Best regards,
Kevin.

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

Reply via email to