From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45006) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z57nZ-0007L3-Iv for qemu-devel@nongnu.org; Wed, 17 Jun 2015 03:30:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z57nW-0004lP-5T for qemu-devel@nongnu.org; Wed, 17 Jun 2015 03:30:13 -0400 Message-ID: <558121F9.6010804@msgid.tls.msk.ru> Date: Wed, 17 Jun 2015 10:30:01 +0300 From: Michael Tokarev MIME-Version: 1.0 References: <1434510002-6976-1-git-send-email-zhaoshenglong@huawei.com> In-Reply-To: <1434510002-6976-1-git-send-email-zhaoshenglong@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 0/8] Add a member in MachineState to store irq array List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Shannon Zhao , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, shannon.zhao@linaro.org 17.06.2015 05:59, Shannon Zhao wrote: > From: Shannon Zhao >=20 > These are relevant to memory leak in machine init function. Here we add > a member in MachineState to store irq array returned from > qemu_allocate_irqs. >=20 > PS. These patches are split from my previous patchset [1] since they ar= e > relevant to MachineState. >=20 > Thanks, > Shannon >=20 > [1] [PATCH 00/29] Fix memory leak relevant to calling qemu_allocate_irq= s >=20 > changes since v2=EF=BC=9A > * Rebased on QEMU upstream > * Add a member in MachineState first, then fix the memory leak [mjt] Um. This is not what I asked. It was a small suggestion, to add infrastructure first use it in subsequent patches. But the main question was what this infrastructure, what this patchset actually brings us? You just store the irq pointer in machine state, that's okay, but WHAT FOR? If your intention is to free resources, this intention isn't met. The end result of this whole change is a no-op= , there's nothing changed, the memory which has been allocated isn't being freed. So the actual question is: what's the point of this patchset? Thanks, /mjt