Unverified Commit b7184135 by Christian Brauner Committed by GitHub

Merge pull request #2355 from 2xsec/master

network: fix socket handle leak
parents f1a571d6 87c6e5db
......@@ -2027,8 +2027,10 @@ int setup_private_host_hw_addr(char *veth1)
return -errno;
err = snprintf((char *)ifr.ifr_name, IFNAMSIZ, "%s", veth1);
if (err < 0 || (size_t)err >= IFNAMSIZ)
if (err < 0 || (size_t)err >= IFNAMSIZ) {
close(sockfd);
return -E2BIG;
}
err = ioctl(sockfd, SIOCGIFHWADDR, &ifr);
if (err < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment