Skip to content

Commit

Permalink
files-reg: don't leak file_remap objects on error paths
Browse files Browse the repository at this point in the history
CID undefined (#1 of 1): Resource leak (RESOURCE_LEAK)
10. leaked_storage: Variable rm going out of scope leaks the storage it points to.
  • Loading branch information
avagin committed Oct 29, 2015
1 parent 0a1021b commit 828af07
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions files-reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ static int open_remap_linked(struct reg_file_info *rfi,
rfd = mntns_get_root_by_mnt_id(rfi->rfe->mnt_id);
if (fstatat(rfd, rrfi->path, &st, AT_SYMLINK_NOFOLLOW)) {
pr_perror("Can't get owner of link remap %s", rrfi->path);
xfree(rm);
return -1;
}

Expand Down

0 comments on commit 828af07

Please sign in to comment.