mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-08 04:36:21 +00:00
coverity: #1425869
do not unmap prematurely Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
de429548c4
commit
3ca108148b
@ -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));
|
||||||
|
Loading…
Reference in New Issue
Block a user