[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/2] virtfs-proxy-helper: Fix handle leak to mak
From: |
Gonglei |
Subject: |
Re: [Qemu-devel] [PATCH 2/2] virtfs-proxy-helper: Fix handle leak to make Coverity happy |
Date: |
Fri, 28 Nov 2014 15:41:55 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 |
On 2014/11/28 15:29, Markus Armbruster wrote:
> Since this is main(), the "caller" is the OS. And yes, the OS closes
> the -f file descriptor when main() returns, because it closes *all* file
> descriptors. Calling close() before return from main() is pointless,
> unless you check for errors.
>
> Unfortunately, Coverity doesn't understand this. Calling close() in
> main() suppresses its bogus defect report.
>
Yes.
>>> >> If sock >= 0 is pointless, too, but needed to hush up Coverity.
>> >
>> > You mean do not check sock_name is NULL or not?
> Yes, unless it causes another bogus Coverity defect.
>
> Or simply mark the defect as invalid and move on without patching the
> code.
Let's drop this patch, thanks.
Regards,
-Gonglei
[Qemu-devel] [PATCH 1/2] virtfs-proxy-helper: Fix possible socket leak., arei.gonglei, 2014/11/13
Re: [Qemu-devel] [PATCH 0/2] virtfs-proxy-helper: Fix Coverity warning, Gonglei, 2014/11/27