Commit 49aba4d3 by Serge Hallyn

lxc_user_nic: fix fd leak reported by coverity

parent 03c2eb15
...@@ -117,6 +117,7 @@ static int open_and_lock(char *path) ...@@ -117,6 +117,7 @@ static int open_and_lock(char *path)
if (fcntl(fd, F_SETLKW, &lk) < 0) { if (fcntl(fd, F_SETLKW, &lk) < 0) {
fprintf(stderr, "Failed to lock %s: %s\n", fprintf(stderr, "Failed to lock %s: %s\n",
path, strerror(errno)); path, strerror(errno));
close(fd);
return -1; return -1;
} }
......
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