From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] examples: fix unchecked malloc return value in ip_pipeline Date: Wed, 17 Dec 2014 01:14:26 +0100 Message-ID: <2349564.YYNY5fXsnQ@xps13> References: <1418387044-22569-1-git-send-email-bruce.richardson@intel.com> <3EB4FA525960D640B5BDFFD6A3D89126322DDC82@IRSMSX108.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: "Richardson, Bruce" Return-path: In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D89126322DDC82-kPTMFJFq+rEMvF1YICWikbfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" > 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 > Acked by: Applied Thanks -- Thomas