On Thu, 22 Oct 2026 at 17:14, Philippe Mathieu-Daudé <[email protected]> wrote: > > On 22/10/26 18:04, Peter Maydell wrote: > > Coverity point out (CID 1660042, 1660052) that some error-exit paths > > in net_init_tap() reach the "close(fd)" at the 'fail' label when 'fd' > > still has its initial value of -1. This isn't a valid fd, so while > > close(-1) will fail and we are ignoring its return value anyway, we > > should avoid it. (Compare net_free_fds() which has "don't close -1" > > logic in it.) > > > > Resolves: Coverity CID 1660042, 1660052 > > Signed-off-by: Peter Maydell <[email protected]> > > --- > > net/tap.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Thanks; I'll pick this one up for target-arm.next since I'm doing a pullreq anyway and it's a trivial coverity nit fix. -- PMM
