char: do not double-close fd when failing to add client
commit8467936e3df3484b4931576a72ae760a1610f022
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 6 Mar 2023 12:27:42 +0000 (6 16:27 +0400)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 13 Mar 2023 11:39:31 +0000 (13 15:39 +0400)
treed36da6a02c19c122e5ce15661ccc254f818768fc
parent6d3b418a4e8d7e74b98ddf3862f8b04e1b198b51
char: do not double-close fd when failing to add client

The caller is already closing the fd on failure.

Fixes: c3054a6e6a ("char: Factor out qmp_add_client() parts and move to chardev/")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230306122751.2355515-3-marcandre.lureau@redhat.com>
chardev/char.c