qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH RFC] coverity: Improve model for GLib memory allocation
Date: Thu, 22 Jan 2015 16:53:20 +0100	[thread overview]
Message-ID: <54C11CF0.4090703@redhat.com> (raw)
In-Reply-To: <873872sw4g.fsf@blackfin.pond.sub.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.

  reply	other threads:[~2015-01-22 15:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22 14:45 [Qemu-devel] [PATCH RFC] coverity: Improve model for GLib memory allocation Markus Armbruster
2015-01-22 14:55 ` Markus Armbruster
2015-01-22 15:53   ` Paolo Bonzini [this message]
2015-01-23 12:04     ` Markus Armbruster
2015-01-23 12:04   ` Thomas Huth
2015-01-28 14:49     ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54C11CF0.4090703@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).