]> Git Repo - qemu.git/commit
util/qemu-sockets: fix keep_alive handling in inet_connect_saddr
authorVladimir Sementsov-Ogievskiy <[email protected]>
Tue, 10 Sep 2019 07:59:43 +0000 (10:59 +0300)
committerEric Blake <[email protected]>
Wed, 25 Sep 2019 13:15:44 +0000 (08:15 -0500)
commitda5e1169183ca6eb6fb470dc32ed1bfc24d1d406
treedb51ff2e33f0446f3db5758999e16f1c49477451
parent506902c6fa80210b002e30ff33794bfc718b15c6
util/qemu-sockets: fix keep_alive handling in inet_connect_saddr

In "if (saddr->keep_alive) {" we may already be on error path, with
invalid sock < 0. Fix it by returning error earlier.

Reported-by: Coverity (CID 1405300)
Fixes: aec21d31756cbd
Suggested-by: Peter Maydell <[email protected]>
Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Message-Id: <20190910075943[email protected]>
Reviewed-by: Daniel P. BerrangĂ© <[email protected]>
Signed-off-by: Eric Blake <[email protected]>
util/qemu-sockets.c
This page took 0.024473 seconds and 4 git commands to generate.