1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

libxl: Resolve Coverity CHECKED_RETURN

Commit id 'cb88d433' refactored the calling sequence to use a thread;
however, in doing so "lost" the check for if virNetSocketAccept returns
failure.  Since other code makes that check, Coverity complains. Although
a false positive, adding back the failure check pacifies Coverity
This commit is contained in:
John Ferlan 2014-12-01 11:10:18 -05:00
parent 025dc403db
commit 5f1d3c6c87

View File

@ -133,8 +133,7 @@ libxlMigrateReceive(virNetSocketPtr sock,
size_t i;
/* Accept migration connection */
virNetSocketAccept(sock, &client_sock);
if (client_sock == NULL) {
if (virNetSocketAccept(sock, &client_sock) < 0 || !client_sock) {
virReportError(VIR_ERR_OPERATION_FAILED, "%s",
_("Failed to accept migration connection"));
goto fail;