From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 41F608DA6 for ; Wed, 18 Apr 2018 11:25:36 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Apr 2018 02:25:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,464,1517904000"; d="scan'208";a="44203195" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.237.220.128]) ([10.237.220.128]) by orsmga003.jf.intel.com with ESMTP; 18 Apr 2018 02:25:33 -0700 To: Thomas Monjalon , Yangchao Zhou Cc: dev@dpdk.org References: <1524020953-27227-1-git-send-email-zhouyates@gmail.com> <2393278.IC1XLxtKtA@xps> From: "Burakov, Anatoly" Message-ID: <6ceb0baf-10f8-f501-54d2-1e3668db0fcb@intel.com> Date: Wed, 18 Apr 2018 10:25:32 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <2393278.IC1XLxtKtA@xps> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3] mem: fix memory leaks of hugedir and replace snprintf 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: Wed, 18 Apr 2018 09:25:36 -0000 On 18-Apr-18 10:00 AM, Thomas Monjalon wrote: > 18/04/2018 05:09, Yangchao Zhou: >> The hugedir returned by get_hugepage_dir is allocated by strdup >> but not released. Replace snprintf with a more suitable strlcpy. >> >> Coverity issue: 272585 >> Fixes: cb97d93e9d3b ("mem: share hugepage info primary and secondary") >> >> Signed-off-by: Yangchao Zhou >> Acked-by: Anatoly Burakov > > There was a misunderstanding. > You replaced some snprintf which were not involved in the leaks. > But I think it's fine. > > Applied, thanks > I'll check to see if i have to rebase my strlcpy patchset. -- Thanks, Anatoly