From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id A3F70A32A2 for ; Thu, 24 Oct 2019 21:17:35 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2F20A1EBE2; Thu, 24 Oct 2019 21:17:35 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 146C81EBE1 for ; Thu, 24 Oct 2019 21:17:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571944652; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MqXXIsQFHmLXugOT2MRzRaoZKUR5SbOlDI+vKCyFgqQ=; b=OKlvnrxjhNE9FrzMlszLQxq00AOK1shzgHNb0Zl5s4lMCyFQ+JkLQMDHJjOfBeUsJg4a0s oGl8sstdCWK9Gk9MUMo/NIy2piwwmcOwnL3ZiQI0fFgFhKa84pPLIpQg+j0D+FLU1j39LK Xd7hJXGGobpSrvcEZavl01aTJm0NtpA= Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-220-vUf6VJEBPOWkIdwiTSi6WQ-1; Thu, 24 Oct 2019 15:17:30 -0400 Received: by mail-ua1-f69.google.com with SMTP id m21so3379661uao.20 for ; Thu, 24 Oct 2019 12:17:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YjMhRcFjDPAVe4IRv4qqyMJLvFmTVzj95OCSvoldBfE=; b=qREnsuecM4W3xFbY3ZnAgVay3Le0pH/khr/rSy/PTOP5/xouskkHop38tziSrYITB3 WlzEgg3zx0JBG09bE07enf8VpAw6IlDSbtkW9QqHKQDZtb4uJyzizA4i+1681E5O4sIu hQKtddNeGkQmH+vPyYhykdHT82csPLGwDjtgpbStw6GMQbrTGkQwaahHa8Qv/NmEHvHZ bDD9Zl0lh36sod+ycL6ijen5BTzSDG55MGSbmog+cOjnXoY/2R4Npt+cn7l7CPYRcKdF gZZzf8MRJWBmlXfNGPOFVtHa0FGWhaG8e8lGbgDroTH0HPnbGqerUe/OkpCVMA5ungug yuBg== X-Gm-Message-State: APjAAAXx/6Q0l7IHTolob2erKRtfXn5B4vwyItaLAcHxWsKhjl4lCpk8 VwN2aRcgChMxdneE7Xf1TH98yYZVLo4VgCOxGNSaippnflmhDB/0gvQqClHMlTzvOh49GpmznNi 3swbwMfiUI7dswPQsq2Y= X-Received: by 2002:ab0:628f:: with SMTP id z15mr9683897uao.126.1571944650325; Thu, 24 Oct 2019 12:17:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqxW6TKfACkEE6/uHIEyyBIu1SxPhAoR9ip1Wbg3mHdZ/6AsccjANtC9cPTfygBfuaG0CQ9T5w7aFttcroy1AZI= X-Received: by 2002:ab0:628f:: with SMTP id z15mr9683870uao.126.1571944649851; Thu, 24 Oct 2019 12:17:29 -0700 (PDT) MIME-Version: 1.0 References: <1568100655-20010-1-git-send-email-agalyax.babu.radhakrishnan@intel.com> <27BEB63E27FEB2409936481F1E06A394D6E2FF@BGSMSX105.gar.corp.intel.com> In-Reply-To: From: David Marchand Date: Thu, 24 Oct 2019 21:17:18 +0200 Message-ID: To: Sachin Saxena Cc: "Babu Radhakrishnan, AgalyaX" , "dev@dpdk.org" , "Pattan, Reshma" , Hemant Agrawal , "Parthasarathy, JananeeX M" , "stable@dpdk.org" X-MC-Unique: vUf6VJEBPOWkIdwiTSi6WQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] bus/fslmc: fix for resource leak coverity issue 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, Oct 3, 2019 at 10:43 AM Sachin Saxena wrote= : > > > > -----Original Message----- > > From: Babu Radhakrishnan, AgalyaX > > > > Sent: Tuesday, September 10, 2019 1:11 PM > > To: dev@dpdk.org > > Cc: Pattan, Reshma ; Hemant Agrawal > > ; Sachin Saxena ; > > Parthasarathy, JananeeX M ; > > stable@dpdk.org > > Subject: RE: [PATCH] bus/fslmc: fix for resource leak coverity issue > > Importance: High > > > > Hi, > > > > > -----Original Message----- > > > From: Babu Radhakrishnan, AgalyaX > > > Sent: Tuesday, September 10, 2019 1:01 PM > > > To: dev@dpdk.org > > > Cc: Pattan, Reshma ; > > hemant.agrawal@nxp.com; > > > sachin.saxena@nxp.com; Parthasarathy, JananeeX M > > > ; Babu Radhakrishnan, AgalyaX > > > ; stable@dpdk.org > > > Subject: [PATCH] bus/fslmc: fix for resource leak coverity issue > > > > > > From: Agalya Babu RadhaKrishnan > > > > > > > > 1 issue caught by 344967 > > > Leaked_storage: Variable sep going out of scope leaks the storage it > > > points to. > > > > > > When 'sep' is not null and sep_exist is 0, 'sep' is freed before goin= g > > > out of scope of the function irrespective of 'addr' exists or not. > > > > > > Coverity Issue: 344967 > > > Fixes: e67a61614d0b ("bus/fslmc: support device iteration") > > > Cc: stable@dpdk.org > > > > > > Signed-off-by: Agalya Babu RadhaKrishnan > > > > > > --- > > > > if (strncmp("dpni", sep, 4) && > > strncmp("dpseci", sep, 6) && > > strncmp("dpcon", sep, 5) & > > ..... > > > > We think validation of device name is done using AND operator instead i= t > > should be done by OR operator. > > Please confirm > [Sachin Saxena] The purpose of this logic to confirm that one of the devi= ce name should match to supported list and as soon as one strncmp() matches= the string it will return 0 and the control comes out of IF condition. > So, existing logic is correct. > Should I understand this as a confirmation of the initial ACK? --=20 David Marchand