From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] dev: fix devargs memleak on IPC detach request Date: Sun, 25 Nov 2018 13:33:23 +0100 Message-ID: <2812273.Y8qkDiBMIR@xps> References: <20181123141107.86553-1-dariusz.stojaczyk@intel.com> <039ED4275CED7440929022BC67E70611532EA1E6@SHSMSX103.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, "Zhang, Qi Z" To: "Stojaczyk, Dariusz" Return-path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id E53B41B478 for ; Sun, 25 Nov 2018 13:33:26 +0100 (CET) In-Reply-To: <039ED4275CED7440929022BC67E70611532EA1E6@SHSMSX103.ccr.corp.intel.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" 23/11/2018 20:17, Zhang, Qi Z: > From: Stojaczyk, Dariusz > > Device detach triggered through IPC leaked some memory. > > It allocated a devargs objects just to use it for parsing the devargs string in order > > to retrieve the device name. Those devargs weren't passed anywhere and were > > never freed. > > > > First of all, let's put those devargs on the stack, so they doesn't need to be freed. > > Then free the additional arguments string as soon as it's allocated, because we > > won't need it. > > > > Fixes: ac9e4a17370f ("eal: support attach/detach shared device from > > secondary") > > Cc: qi.z.zhang@intel.com > > > > Signed-off-by: Darek Stojaczyk > > Acked-by: Qi Zhang Applied, thanks