examples/ip_pipeline: fix memory allocation check
authorBruce Richardson <bruce.richardson@intel.com>
Fri, 12 Dec 2014 12:24:04 +0000 (12:24 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 17 Dec 2014 00:04:06 +0000 (01:04 +0100)
commit95df1d78c66567a229667acfed290ced6fef8b61
tree0a1c3daef7dd6bf7576f4bfa43ccbc0acb9c07ab
parent225979558a2ab53149153d1c6c51983703a1b44c
examples/ip_pipeline: fix memory allocation check

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@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
examples/ip_pipeline/cmdline.c