From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnUP2-0005MR-5h for qemu-devel@nongnu.org; Mon, 02 Dec 2013 09:23:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VnUOx-0007yV-5J for qemu-devel@nongnu.org; Mon, 02 Dec 2013 09:23:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10185) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VnUOw-0007yR-TC for qemu-devel@nongnu.org; Mon, 02 Dec 2013 09:23:07 -0500 Message-ID: <529C97C2.9010600@redhat.com> Date: Mon, 02 Dec 2013 15:22:58 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1385994059-16812-1-git-send-email-marcel.a@redhat.com> In-Reply-To: <1385994059-16812-1-git-send-email-marcel.a@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] memory.c: bugfix - ref counting mismatch in memory_region_find List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Marcel Apfelbaum Cc: peter.maydell@linaro.org, mst@redhat.com, jan.kiszka@siemens.com, qemu-devel@nongnu.org, anthony@codemonkey.ws, rth@twiddle.net Il 02/12/2013 15:20, Marcel Apfelbaum ha scritto: > 'address_space_get_flatview' gets a reference to a FlatView. > If the flatview lookup fails, the code returns without > "unreferencing" the view. > > Cc: qemu-stable@nongnu.org > > Signed-off-by: Marcel Apfelbaum > --- > memory.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/memory.c b/memory.c > index 28f6449..7764314 100644 > --- a/memory.c > +++ b/memory.c > @@ -1596,6 +1596,7 @@ MemoryRegionSection memory_region_find(MemoryRegion *mr, > view = address_space_get_flatview(as); > fr = flatview_lookup(view, range); > if (!fr) { > + flatview_unref(view); > return ret; > } > > Reviewed-by: Paolo Bonzini