[dpdk-dev] [PATCH] examples: fix unchecked malloc return value in ip_pipeline

Thomas Monjalon thomas.monjalon at 6wind.com
Fri Dec 12 16:34:27 CET 2014


Hi Cristian,

2014-12-12 15:19, Dumitrescu, Cristian:
> Acked by: <Cristian.Dumitrescu at intel.com>

Please, next time,
- add you acked-by below the signed-off,
- put your name and a real email address (like in a signed-off),
- and remove the patch to make email shorter.

I think the web site needs to be updated to explain such things.


> -----Original Message-----
> From: Richardson, Bruce 
> Sent: Friday, December 12, 2014 12:24 PM
> To: dev at dpdk.org; Dumitrescu, Cristian
> Cc: Richardson, Bruce
> Subject: [PATCH] examples: fix unchecked malloc return value in ip_pipeline
> 
> Static analysis shows that once instance of rte_zmalloc is missing
> a return value check in the code. This is fixed by adding a return
> value check. The malloc call itself is moved to earlier in the function
> so that no work is done unless all memory allocation requests have
> succeeded - thereby removing the need for rollback on error.
> 
> Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> ---
>  examples/ip_pipeline/cmdline.c | 20 +++++++++++++-------
>  1 file changed, 13 insertions(+), 7 deletions(-)
> 
> diff --git a/examples/ip_pipeline/cmdline.c b/examples/ip_pipeline/cmdline.c
> index 13d565e..152acb5 100644
> --- a/examples/ip_pipeline/cmdline.c
> +++ b/examples/ip_pipeline/cmdline.c
[...]



More information about the dev mailing list