From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f47.google.com (mail-lf0-f47.google.com [209.85.215.47]) by dpdk.org (Postfix) with ESMTP id 68546C75A for ; Wed, 15 Jun 2016 16:48:58 +0200 (CEST) Received: by mail-lf0-f47.google.com with SMTP id l188so13187951lfe.2 for ; Wed, 15 Jun 2016 07:48:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=H+MOe8mEweQ0rH4cy8V4SqR4ktK4H4EzJSVaOiKdSE4=; b=x2uypUpQj5lBj6H0X+DFcE4fe/QJr8iADfDjS9oC7TLKKELyHhmQ6iRlA4U6Snv3lX Bi5gd9z1fkEmfX8PJEhfvIFbLSK6RapnGPVyT03P1SzJjwtvroBMH02MdbI9BsHFdBOi 4wm7B6NQgvxLQXpEkUBej/UNam+WtBIpUjuc+d17Buio0S/X5N+965FhRoZgKyeSdbep XUCqg82DHem2XJf+WG4kOHUUUYgdpUH0jeo8zUmtwH9mHP5Rt6k28C3maTFtpoNlFA+X Ubq2+fPxwgK4jTljH59McHfM6syg7qvPrfuH/4xe8smu5sGJgnmqIHPsH3zmKerkV5Op IuSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=H+MOe8mEweQ0rH4cy8V4SqR4ktK4H4EzJSVaOiKdSE4=; b=lmVJhSPSUNTXF1I94X2Lzk5EWnUeCH40mSwysrrmvpnOhJ+9SGm+KlZtkTC+7PwQ2I sMY0CbaUQum0Wu50A0Fu6rOnRjE4s9PuXjaAJETu2bjqjcg6SjcVGj79eepYXl8NbNht I3p1tPHm4LcYakYbTFXYif1bTxZpAE/+xUirOBKrArfunMN4RiRzzPjj+0b8Ock8fIq3 uMfIfE7IbIe+dGSsKbEFEiUEPiyo9ItkRQgZA3bs34nwAAp/mqmvlbl51bh02TiWcL79 EWujQvyDmGJh716mDibjAW84svXfPbRZA98Qi5lyleA8mVISvBOxOAaOirbLzrLoDmFN snKg== X-Gm-Message-State: ALyK8tJI4grTwSHgo/gqZCjt/BVLdgtBBpbdrn+c1ZM6quHeo6+A8YTBBUuNlAMJEE/mDb0VQAzyDsCJByLkKsqW X-Received: by 10.194.94.39 with SMTP id cz7mr11820054wjb.135.1466002137873; Wed, 15 Jun 2016 07:48:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.16.13 with HTTP; Wed, 15 Jun 2016 07:48:38 -0700 (PDT) In-Reply-To: <1465961209-28309-1-git-send-email-mukawa@igel.co.jp> References: <1465961209-28309-1-git-send-email-mukawa@igel.co.jp> From: David Marchand Date: Wed, 15 Jun 2016 16:48:38 +0200 Message-ID: To: Tetsuya Mukawa Cc: "dev@dpdk.org" , "Mcnamara, John" , michalx.k.jastrzebski@intel.com Content-Type: text/plain; charset=UTF-8 Subject: Re: [dpdk-dev] [PATCH] eal: Fix wrong error checking of rte_eal_parse_devargs_str() 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, 15 Jun 2016 14:48:58 -0000 On Wed, Jun 15, 2016 at 5:26 AM, Tetsuya Mukawa wrote: > Currently, a return value of strdup() isn't checked correctly. > The patch fixes it. > > Signed-off-by: Tetsuya Mukawa Idem, the title does not need the function name to describe what is going wrong. This might deserve a fixline, I traced this to 0fe11ec592b2 ("eal: add vdev init and uninit"). > --- > lib/librte_eal/common/eal_common_devargs.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c > index 2bfe54a..e403717 100644 > --- a/lib/librte_eal/common/eal_common_devargs.c > +++ b/lib/librte_eal/common/eal_common_devargs.c > @@ -58,7 +58,7 @@ rte_eal_parse_devargs_str(const char *devargs_str, > return -1; > > *drvname = strdup(devargs_str); > - if (drvname == NULL) > + if (*drvname == NULL) > return -1; > > /* set the first ',' to '\0' to split name and arguments */ > -- > 2.7.4 > -- David Marchand