From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v3] mem: fix memory leaks of hugedir and replace snprintf Date: Wed, 18 Apr 2018 11:00:50 +0200 Message-ID: <2393278.IC1XLxtKtA@xps> References: <1524020953-27227-1-git-send-email-zhouyates@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, anatoly.burakov@intel.com To: Yangchao Zhou Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 110417EB0 for ; Wed, 18 Apr 2018 11:00:52 +0200 (CEST) In-Reply-To: <1524020953-27227-1-git-send-email-zhouyates@gmail.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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