Received: from eggs.gnu.org ([2001:4830:134:3::10]:40191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0pXX-00083j-Qb for qemu-devel@nongnu.org; Mon, 23 Nov 2015 06:44:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a0pXU-0002uE-K8 for qemu-devel@nongnu.org; Mon, 23 Nov 2015 06:44:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53416) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a0pXU-0002tR-F5 for qemu-devel@nongnu.org; Mon, 23 Nov 2015 06:44:08 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 1C8FE8EA37 for ; Mon, 23 Nov 2015 11:44:06 +0000 (UTC) From: Markus Armbruster References: <1448267731-32678-1-git-send-email-armbru@redhat.com> <20151123110101-mutt-send-email-mst@redhat.com> Date: Mon, 23 Nov 2015 12:44:04 +0100 In-Reply-To: <20151123110101-mutt-send-email-mst@redhat.com> (Michael S. Tsirkin's message of "Mon, 23 Nov 2015 11:01:09 +0200") Message-ID: <87egfh3pq3.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v2] numa: Clean up query-memdev error handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org, ehabkost@redhat.com "Michael S. Tsirkin" writes: > On Mon, Nov 23, 2015 at 09:35:31AM +0100, Markus Armbruster wrote: >> qmp_query_memdev() has two error paths: >> >> * When object_get_objects_root() returns null. It never does, so >> simply drop the useless error handling. >> >> * When query_memdev() fails. It leaks err then. But any failure >> there is actually a programming error. Switch it to &error_abort, >> and drop the useless error handling. >> >> Messed up in commit 76b5d85 "qmp: add query-memdev". >> >> Signed-off-by: Markus Armbruster > > > Post 2.5 right? I don't mind. I meant v1 for 2.5, but we've since convinced ourselves that errors can't happen, and the memory leak is only latent.