From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 56F741B3FE; Fri, 22 Dec 2017 17:26:53 +0100 (CET) Received: from lfbn-lil-1-110-231.w90-45.abo.wanadoo.fr ([90.45.197.231] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1eSQG0-0006pZ-Ne; Fri, 22 Dec 2017 17:33:14 +0100 Received: by droids-corp.org (sSMTP sendmail emulation); Fri, 22 Dec 2017 17:26:43 +0100 Date: Fri, 22 Dec 2017 17:26:43 +0100 From: Olivier MATZ To: Anatoly Burakov Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20171222162642.brpmnqhtovmlwxe2@platinum> References: <9d5a3bc7a779b2dddab4256aa3e0631737861f98.1513867589.git.anatoly.burakov@intel.com> <5dee0afeaa0d007dfc9d949b1975c97537585ca4.1513867589.git.anatoly.burakov@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5dee0afeaa0d007dfc9d949b1975c97537585ca4.1513867589.git.anatoly.burakov@intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-stable] [PATCH 3/6] test: fix memory leak in ring autotest X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2017 16:26:53 -0000 Hi, On Fri, Dec 22, 2017 at 10:12:07AM +0000, Anatoly Burakov wrote: > Fixes: af75078fece3 ("first public release") Not sure about this commit id: freeing rings is only possible since commit 4e32101f9b01 ("ring: support freeing"). [...] > @@ -894,6 +895,8 @@ test_ring(void) > /* dump the ring status */ > rte_ring_list_dump(stdout); > > + rte_ring_free(r); > + > return 0; I think this is incorrect: r is a static variable, and if it is not set to NULL, it will be reused at next call. Ideally, removing the static variable would be better than just resetting the value to NULL, but it will require more modifications: add a ring argument to test function, and change return -1 -> goto fail.