Fixes to Coverity defects.

This commit is contained in:
Markus Makela
2015-04-16 19:41:49 +03:00
parent cceca1b428
commit 1b3af7d61f
9 changed files with 32 additions and 35 deletions

View File

@ -2069,6 +2069,7 @@ config_get_ifaddr(unsigned char *output)
ifc.ifc_len = sizeof(buf);
ifc.ifc_buf = buf;
if (ioctl(sock, SIOCGIFCONF, &ifc) == -1) {
close(sock);
return 0;
}
@ -2085,6 +2086,7 @@ config_get_ifaddr(unsigned char *output)
}
}
} else {
close(sock);
return 0;
}
}