[PATCH] test/security: fix buffer leaks in error path

Stephen Hemminger stephen at networkplumber.org
Tue Sep 19 16:58:11 CEST 2023


On Tue, 22 Aug 2023 23:03:16 +0530
Akhil Goyal <gakhil at marvell.com> wrote:

> diff --git a/app/test/test_security_inline_macsec.c b/app/test/test_security_inline_macsec.c
> index 20670fe5d2..8b57bc51fb 100644
> --- a/app/test/test_security_inline_macsec.c
> +++ b/app/test/test_security_inline_macsec.c
> @@ -837,6 +837,11 @@ test_macsec_event_callback(uint16_t port_id, enum rte_eth_event_type type,
>  	return 0;
>  }
>  
> +#define FREE_PKTS(j, m) {		\
> +	while (j--)			\
> +		rte_pktmbuf_free(m[j]);	\
> +}
> +

This is just a slower version of rte_pktmbuf_free_bulk!


More information about the dev mailing list