From: Richard W.M. Jones Date: Wed, 1 Jan 2014 15:49:53 +0000 (+0000) Subject: tests: virnetsockettest: Print the error if getifaddrs fails. X-Git-Tag: CVE-2013-6458-1~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb00420;p=thirdparty%2Flibvirt.git tests: virnetsockettest: Print the error if getifaddrs fails. --- diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c index eda95bcc02..82c202e101 100644 --- a/tests/virnetsockettest.c +++ b/tests/virnetsockettest.c @@ -60,8 +60,10 @@ checkProtocols(bool *hasIPv4, bool *hasIPv6, *hasIPv4 = *hasIPv6 = false; *freePort = 0; - if (getifaddrs(&ifaddr) < 0) + if (getifaddrs(&ifaddr) < 0) { + perror ("getifaddrs"); goto cleanup; + } for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) { if (!ifa->ifa_addr)