From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by dpdk.org (Postfix) with ESMTP id 34D553F9 for ; Wed, 17 Dec 2014 01:14:53 +0100 (CET) Received: by mail-wi0-f175.google.com with SMTP id l15so14027825wiw.8 for ; Tue, 16 Dec 2014 16:14:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=ywOwse78B5xB0AkUHoGoAKqxdYkupa9+6czruvJtPD0=; b=dJ0xRSNK+2NuxMuXg9oIkHJTWQ5PcPsqbhOFG23DgWFP/ogl6/RtEuuYzROiyFOrRW GMebyZdUZ5mRdMZBPZbJLoxTRyDd617veFdglHQu7/Vnt+aq2m6+nq0r/wcxXwDB7uax IrGqu+Vn8IykLFSJdg9kddy48m4ppA7BO1nhPM7mIr9eXfOrK2p3TXOMSVkkizDaYbsc Zhq/GZ40EsFkmvU9CJgn59+N+NKkhlSrCWtw/KSUxAkjg24mqCYqHC14k3pT/QE4fUsw 0Tk1/nSj/FsNQ+TFB484EjKI3BNAANyJaJ3/i1moYewMWKXS6vnWnLOSNDC+YKqe0V4R ExBA== X-Gm-Message-State: ALoCoQntiiQqNkoCNR3ERk3nn168KYfUHZ/0lsUs0+UB8s0z5VjgpXNTVDRiN15Ogt5da/gV10gg X-Received: by 10.180.36.162 with SMTP id r2mr8834301wij.75.1418775293113; Tue, 16 Dec 2014 16:14:53 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id h13sm18813537wiw.4.2014.12.16.16.14.51 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Dec 2014 16:14:52 -0800 (PST) From: Thomas Monjalon To: "Richardson, Bruce" Date: Wed, 17 Dec 2014 01:14:26 +0100 Message-ID: <2349564.YYNY5fXsnQ@xps13> Organization: 6WIND User-Agent: KMail/4.14.3 (Linux/3.17.4-1-ARCH; KDE/4.14.3; x86_64; ; ) In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D89126322DDC82@IRSMSX108.ger.corp.intel.com> References: <1418387044-22569-1-git-send-email-bruce.richardson@intel.com> <3EB4FA525960D640B5BDFFD6A3D89126322DDC82@IRSMSX108.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] examples: fix unchecked malloc return value in ip_pipeline X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Dec 2014 00:14:53 -0000 > 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