diff options
| author | Paolo Bonzini | 2022-09-05 13:01:27 +0200 |
|---|---|---|
| committer | Paolo Bonzini | 2022-09-18 09:17:41 +0200 |
| commit | 5dc51100394206b4ca3fdcafb008de8f99fc4676 (patch) | |
| tree | b9f9a3971af534e823e3847931c070b5d710a492 /tests | |
| parent | tests: unit: simplify test-visitor-serialization list tests (diff) | |
| download | qemu-5dc51100394206b4ca3fdcafb008de8f99fc4676.tar.gz qemu-5dc51100394206b4ca3fdcafb008de8f99fc4676.tar.xz qemu-5dc51100394206b4ca3fdcafb008de8f99fc4676.zip | |
tests: test-qga: close socket on failure to connect
Reported by Coverity as CID 1432543.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/test-qga.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/unit/test-qga.c b/tests/unit/test-qga.c index a05a4628ed..d27ff94d13 100644 --- a/tests/unit/test-qga.c +++ b/tests/unit/test-qga.c @@ -32,6 +32,7 @@ static int connect_qga(char *path) g_usleep(G_USEC_PER_SEC); } if (i++ == 10) { + close(s); return -1; } } while (ret == -1); |
