From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 658182100A; Wed, 18 Apr 2018 05:00:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 18 Apr 2018 05:00:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=kgeYfcRdHpdRJGT8glr8mlv510 ObqnFJkig3h+f4X8w=; b=mgmcl313zyAdfXLDyi3+q78U9lncFkI9hAOPoA5qkO nPjx+1j6z1HLJlkadE5VomUS+vTcLmC9QoyY9INCYYm3TbYBF81WJkMXX7UX9OlZ OT/XiNiVvwymfU8kDaWh9SUZjf5UXUdW4UAjYxn3jMZIJGyuhh/gArMrmrfxEGsl I= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=kgeYfc RdHpdRJGT8glr8mlv510ObqnFJkig3h+f4X8w=; b=ijR5ZYOH5YmlcemTXiWOp8 QPozcFGZCwl6n9Dxl4t41q96qmv/h3st6h8gC4o8uYFNmMmCG9NQzZ45GdSQsHg7 LfC7WrWBBQH+Y1YRl81olHJ/lLTfTLh/Ocry3420tax4hIm7UuOFzShz2fQrpdWW hb3K0Yr+GLpn7nYh+s73U+OhOjdFQLXVWS0wjHKD4vAEKQNYe6kMKwn8m8GQCl7T hw8OlL1az8O/QQ9ky4PdbUv0Un7vt9CEIvuC88k8fBtHPNvz9gN8Pmy1rYKA1rIF WIQXgNMlqeEnIN0H56fZw0dQT3ZByCM5QsLiMg+mpRnYqgL+m3tUE0/J5MyZemyQ == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id A803BE50A2; Wed, 18 Apr 2018 05:00:51 -0400 (EDT) From: Thomas Monjalon To: Yangchao Zhou Cc: dev@dpdk.org, anatoly.burakov@intel.com Date: Wed, 18 Apr 2018 11:00:50 +0200 Message-ID: <2393278.IC1XLxtKtA@xps> In-Reply-To: <1524020953-27227-1-git-send-email-zhouyates@gmail.com> References: <1524020953-27227-1-git-send-email-zhouyates@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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:00:53 -0000 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