From: Markus Armbruster <armbru@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, Fabiano Rosas <farosas@suse.de>,
Paolo Bonzini <pbonzini@redhat.com>,
Laurent Vivier <lvivier@redhat.com>
Subject: Re: [PATCH] qtest: ensure socket_accept() return value is initialized
Date: Mon, 26 Oct 2026 16:25:28 +0100 [thread overview]
Message-ID: <87bj8gcwlz.fsf@pond.sub.org> (raw)
In-Reply-To: <at9kkSt9ehSVrK6w@redhat.com> ("Daniel P. Berrangé"'s message of "Mon, 26 Oct 2026 14:32:49 +0000")
Daniel P. Berrangé <berrange@redhat.com> writes:
> On Mon, Oct 26, 2026 at 02:54:32PM +0100, Markus Armbruster wrote:
[...]
>> Hmm, should we close(sock) on failure here?
>
> Opps, yes, you are right - we should in fact fall through to
> the cleanup: label, as the intention is 'sock' is closed in
> all, as the caller expects socket_accept() to close the sock
> in all cases. That's a second bug in my original patch.
>
> This is pretty unpleasant semantics though - the caller owns
> the socket and should own closing it.
Oh yes. Even more so since the function is called *_accept().
[...]
prev parent reply other threads:[~2026-10-26 15:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 12:40 [PATCH] qtest: ensure socket_accept() return value is initialized Daniel P. Berrangé
2026-10-26 13:54 ` Markus Armbruster
2026-10-26 14:32 ` Daniel P. Berrangé
2026-10-26 15:25 ` Markus Armbruster [this message]
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=87bj8gcwlz.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=farosas@suse.de \
--cc=lvivier@redhat.com \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.