[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: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH RFC] coverity: Improve model for GLib memory allocation |
Date: |
Fri, 23 Jan 2015 13:04:33 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Paolo Bonzini <address@hidden> 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...
[...]