parse: do not mask failed parse

parent 929a141a
...@@ -111,9 +111,11 @@ int lxc_file_for_each_line_mmap(const char *file, lxc_file_cb callback, void *da ...@@ -111,9 +111,11 @@ int lxc_file_for_each_line_mmap(const char *file, lxc_file_cb callback, void *da
} }
on_error: on_error:
ret = lxc_strmunmap(buf, st.st_size); if (lxc_strmunmap(buf, st.st_size) < 0) {
if (ret < 0)
SYSERROR("Failed to unmap config file \"%s\"", file); SYSERROR("Failed to unmap config file \"%s\"", file);
if (ret == 0)
ret = -1;
}
saved_errno = errno; saved_errno = errno;
close(fd); close(fd);
......
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