From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH v3] mem: fix memory leaks of hugedir and replace snprintf Date: Wed, 18 Apr 2018 10:25:32 +0100 Message-ID: <6ceb0baf-10f8-f501-54d2-1e3668db0fcb@intel.com> References: <1524020953-27227-1-git-send-email-zhouyates@gmail.com> <2393278.IC1XLxtKtA@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Thomas Monjalon , Yangchao Zhou 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) In-Reply-To: <2393278.IC1XLxtKtA@xps> Content-Language: en-US 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 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