coverity: #1435604

Resource leak Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 5762579e
......@@ -1838,8 +1838,10 @@ int lxc_bridge_attach(const char *bridge, const char *ifname)
return -errno;
retlen = strlcpy(ifr.ifr_name, bridge, IFNAMSIZ);
if (retlen >= IFNAMSIZ)
if (retlen >= IFNAMSIZ) {
close(fd);
return -E2BIG;
}
ifr.ifr_ifindex = index;
err = ioctl(fd, SIOCBRADDIF, &ifr);
......
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