From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id EDF5299E9 for ; Mon, 31 Jul 2017 17:22:34 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9F8732064A; Mon, 31 Jul 2017 11:22:34 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 31 Jul 2017 11:22:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=t2StQjKxP70G/uK O41UQSfgaK6fizO3I4nJ8ZqmkvzI=; b=kXROTjxV8Aa3DyGVu/7eTPkpfO4hixa FJXKvuyxgiGGTUKl7194QYvYjiYkrpUYo+plkUh4DfU45CvdrWsS3YV0MJ8wEFae 0NbVxl0ugIAAeSMde40WxLICDebgCnRlcbCefGdDEOdv63TgZ+IXsZ6ZPBGauj5U 69UGLyfgdF6o= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=t2StQjKxP70G/uKO41UQSfgaK6fizO3I4nJ8ZqmkvzI=; b=M+MGP767 C+VnJg8A733hdMIH2WhKo+PQsde+v6pCJwpQR5ZBBpFUV70YtgbUp3GeYMHIKpIu d5OIJA4uCMssjV62Cr5yRwXhwiD/B2zON1ZTGc8byV1g8A/MkrqtshZkHKl+jXTY 7SPOsS0bHq9P9Ju+S4KYBUvYiHl81lBSmYmNlLAz6uSJr3sHqCc8uCXseSCI3g8n RIy7z+ru9ytpZtwVa/1MOrG8pGYAG1ed2fzVgjX5gyQfjS9zRSOq3IEwWZJSLnQ4 ZyKRBaubQFi6ylg0kvXi8dg86ocr58n4sLiseIBqIuJMPu2yZ1gHkzR83XaeVNn4 HFxYPV/6gmPgXQ== X-ME-Sender: X-Sasl-enc: uEPxj91uwR6Fr+wIQA10d/RPzJUaqVYV0+TIk+ontozI 1501514554 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 4D02D2492F; Mon, 31 Jul 2017 11:22:34 -0400 (EDT) From: Thomas Monjalon To: Pablo de Lara Cc: dev@dpdk.org, Sergio Gonzalez Monroy , declan.doherty@intel.com Date: Mon, 31 Jul 2017 17:22:33 +0200 Message-ID: <8040895.veDesW7eHG@xps> In-Reply-To: References: <20170731023050.28956-1-pablo.de.lara.guarch@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH] cryptodev: fix NULL pointer dereference X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Jul 2017 15:22:35 -0000 31/07/2017 14:32, Sergio Gonzalez Monroy: > On 31/07/2017 03:30, Pablo de Lara wrote: > > --- a/lib/librte_cryptodev/rte_cryptodev.c > > +++ b/lib/librte_cryptodev/rte_cryptodev.c > > @@ -1404,6 +1404,12 @@ rte_cryptodev_allocate_driver(const struct rte_driver *drv) > > struct cryptodev_driver *driver; > > > > driver = malloc(sizeof(*driver)); > > + > > + if (driver == NULL) > > + rte_exit(EXIT_FAILURE, > > + "Could not allocate memory for crypto driver %u\n", > > + nb_drivers); > > + > > driver->driver = drv; > > driver->id = nb_drivers; > > > > Acked-by: Sergio Gonzalez Monroy NACK rte_exit/rte_panic in libraries.