qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH RFC] coverity: Improve model for GLib memory all


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH RFC] coverity: Improve model for GLib memory allocation
Date: Thu, 22 Jan 2015 16:53:20 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0


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 via email to

[Prev in Thread] Current Thread [Next in Thread]