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 438B0A32A2 for ; Thu, 24 Oct 2019 21:17:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 15B621EBE9; Thu, 24 Oct 2019 21:17:38 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by dpdk.org (Postfix) with ESMTP id 8527F1EBE1 for ; Thu, 24 Oct 2019 21:17:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571944654; 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=bxEw1098EW1y1BHwfDWnMDOYv4oGDqbFN+dfxgGBsqouYT4iM/52xDL+li3YW7GyZAKj1j IZyLf9G5SktVTF956OJfCaDKtkPquTIHYHx1RorlbE6lbIkMmKjOqWVhMM0GHKsyvWpx1s VJ9w9waviWVUr7in7xg9HRoLzvlRQ8c= Received: from mail-ua1-f70.google.com (mail-ua1-f70.google.com [209.85.222.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-278-oOqGQPEbMlm8ztyjZamEtA-1; Thu, 24 Oct 2019 15:17:30 -0400 Received: by mail-ua1-f70.google.com with SMTP id p17so3379360uam.15 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=X8IZ/xg+8SNu8leslOOSYsZ+naO8+wsmYUYGs2mgMT6AoZuJ+EbeE0RPcW3Ujz/wiU Gw77PZvFO9zeXBRK89RJiEbm+36OUPFdYfYvxfqPuZpQv/P8/XprvdeWkrhSO5sWoPN3 D9sWMD1BjTVfOMT6+etj26/6uYUgS3GEVRaO0rx8grLY81b3gAUvBvbfrQhTKwmuMC/f 1IaXi4FQwgZ0nJaPzOvg79ppR2SXAsotrpd8TisHPX5L5jhJy9H9pomPFlCCY51fym7v +7w0Sp7rYxsxhFSEAslCa15fbRqIePsmVIMHYImbtQZrGHCyGkOpto4/MpD00t4V7/Tw x4Vg== X-Gm-Message-State: APjAAAVYVQ4VyXf6ZXayi4aQkqmTJyS4L8VZhLm6RtmMht+zLu4/25MY 0LFE4ZXLVIKLsTMSAcub0/k61+JK3FK6Iuyc8WLwQLAztVTeT6AzXr3jQNWww1YVswQqr+06wH/ wDPg9Eh/8FicfpX8F0PLvc+c= X-Received: by 2002:ab0:628f:: with SMTP id z15mr9683899uao.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: oOqGQPEbMlm8ztyjZamEtA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH] bus/fslmc: fix for resource leak coverity issue X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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