tests: test-qga: close socket on failure to connect
Reported by Coverity as CID 1432543. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
ac9e723fb6
commit
5dc5110039
@ -32,6 +32,7 @@ static int connect_qga(char *path)
|
|||||||
g_usleep(G_USEC_PER_SEC);
|
g_usleep(G_USEC_PER_SEC);
|
||||||
}
|
}
|
||||||
if (i++ == 10) {
|
if (i++ == 10) {
|
||||||
|
close(s);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} while (ret == -1);
|
} while (ret == -1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user