Unverified Commit 23852ec4 by Christian Brauner Committed by GitHub

Merge pull request #3052 from tanyifeng/fd_leak

parse.c: fix fd leak from memfd_create
parents 2fea2116 22c8ac96
...@@ -98,7 +98,7 @@ int lxc_file_for_each_line_mmap(const char *file, lxc_file_cb callback, void *da ...@@ -98,7 +98,7 @@ int lxc_file_for_each_line_mmap(const char *file, lxc_file_cb callback, void *da
fd = open(file, O_RDONLY | O_CLOEXEC); fd = open(file, O_RDONLY | O_CLOEXEC);
if (fd < 0) { if (fd < 0) {
SYSERROR("Failed to open file \"%s\"", file); SYSERROR("Failed to open file \"%s\"", file);
return -1; goto on_error;
} }
/* sendfile() handles up to 2GB. No config file should be that big. */ /* sendfile() handles up to 2GB. No config file should be that big. */
......
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