Skip to content

Commit b3a5d28

Browse files
committed
lxc/conf: do not leak opts.data memory in __lxc_idmapped_mounts_child()
Fixes: Coverity 1641425 Signed-off-by: Alexander Mikhalitsyn <[email protected]>
1 parent 5db329a commit b3a5d28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lxc/conf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2682,11 +2682,11 @@ static int __lxc_idmapped_mounts_child(struct lxc_handler *handler, FILE *f)
26822682
ret = parse_lxc_mount_attrs(&opts, mntent.mnt_opts);
26832683
if (ret < 0)
26842684
return syserror("Failed to parse LXC specific mount options");
2685-
__data = opts.data;
26862685

26872686
ret = parse_mount_attrs(&opts, mntent.mnt_opts);
26882687
if (ret < 0)
26892688
return syserror("Failed to parse mount options");
2689+
__data = opts.data;
26902690

26912691
/* No idmapped mount entry so skip it. */
26922692
if (is_empty_string(opts.userns_path))

0 commit comments

Comments
 (0)