Received: from eggs.gnu.org ([2001:4830:134:3::10]:59504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEcyi-0005ET-Mq for qemu-devel@nongnu.org; Fri, 23 Jan 2015 07:04:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEcyb-0006pr-36 for qemu-devel@nongnu.org; Fri, 23 Jan 2015 07:04:44 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEcya-0006pm-SS for qemu-devel@nongnu.org; Fri, 23 Jan 2015 07:04:37 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0NC4aPt022725 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 23 Jan 2015 07:04:36 -0500 From: Markus Armbruster References: <1421937913-21613-1-git-send-email-armbru@redhat.com> <873872sw4g.fsf@blackfin.pond.sub.org> <54C11CF0.4090703@redhat.com> Date: Fri, 23 Jan 2015 13:04:33 +0100 In-Reply-To: <54C11CF0.4090703@redhat.com> (Paolo Bonzini's message of "Thu, 22 Jan 2015 16:53:20 +0100") Message-ID: <873871pusu.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH RFC] coverity: Improve model for GLib memory allocation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org Paolo Bonzini writes: > On 22/01/2015 15:55, Markus Armbruster wrote: >> == Look like a bug == >> >> blockdev-nbd.c:35: leaked_handle: Handle variable "fd" going out of >> scope leaks the handle. > > It's a false positive. > > After nbd_client_new calls nbd_send_negotiate, either it returns or > client escapes via QTAILQ_INSERT_TAIL (either in nbd_client_new or in > nbd_handle_export_name). > > So I think it's the same as below. > > >> == Look like false positive == >> >> The ones in qemu-char.c should be suppressed by our model of >> g_io_channel_unix_new(). Can't see how it screwed that up. > > It seems okay to me too, but these are exactly the false positive that > the g_malloc model is supposed to avoid... Hmm, I forgot to model g_realloc_n(). And I think I can improve the modelling of "can / can't return null". Let me tinker some more... [...]