From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEK4X-0002me-2N for qemu-devel@nongnu.org; Thu, 22 Jan 2015 10:53:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEK4T-0005XT-T7 for qemu-devel@nongnu.org; Thu, 22 Jan 2015 10:53:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEK4T-0005XE-KX for qemu-devel@nongnu.org; Thu, 22 Jan 2015 10:53:25 -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 (8.14.4/8.14.4) with ESMTP id t0MFrOYI016866 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 22 Jan 2015 10:53:24 -0500 Message-ID: <54C11CF0.4090703@redhat.com> Date: Thu, 22 Jan 2015 16:53:20 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1421937913-21613-1-git-send-email-armbru@redhat.com> <873872sw4g.fsf@blackfin.pond.sub.org> In-Reply-To: <873872sw4g.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit 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: Markus Armbruster , qemu-devel@nongnu.org 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... Paolo > qemu-char.c:1107: leaked_handle: Handle variable "fd_in" going out of scope leaks the handle. > qemu-char.c:1107: leaked_handle: Handle variable "fd_out" going out of scope leaks the handle. > qemu-char.c:4062: leaked_handle: Handle variable "in" going out of scope leaks the handle. > qemu-char.c:4062: leaked_handle: Handle variable "out" going out of scope leaks the handle. > qemu-char.c:4076: leaked_handle: Handle variable "fd" going out of scope leaks the handle. > qemu-nbd.c:383: leaked_handle: Handle variable "fd" going out of scope leaks the handle. > ui/vnc.c:2930: leaked_handle: Handle variable "csock" going out of scope leaks the handle. > ui/vnc.c:3312: leaked_handle: Handle variable "csock" going out of scope leaks the handle.