coverity: #1425869

do not unmap prematurely Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 49f6cf17
...@@ -625,8 +625,8 @@ static bool cull_entries(int fd, char *name, char *net_type, char *net_link, ...@@ -625,8 +625,8 @@ static bool cull_entries(int fd, char *name, char *net_type, char *net_link,
} }
free(entry_lines); free(entry_lines);
lxc_strmunmap(buf, sb.st_size);
ret = ftruncate(fd, buf_start - buf); ret = ftruncate(fd, buf_start - buf);
lxc_strmunmap(buf, sb.st_size);
if (ret < 0) if (ret < 0)
usernic_error("Failed to set new file size: %s\n", usernic_error("Failed to set new file size: %s\n",
strerror(errno)); strerror(errno));
......
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