Skip to content

Commit 0aaa618

Browse files
committed
quota: Drop path reference on error exit from quotactl
One error exit from quotactl forgot to do path_put(). Fix that. Reported-by: Valerie Aurora <val@vaaconsulting.com> Signed-off-by: Jan Kara <jack@suse.cz>
1 parent a983f36 commit 0aaa618

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎fs/quota/quota.c‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,12 +363,15 @@ SYSCALL_DEFINE4(quotactl, unsigned int, cmd, const char __user *, special,
363363
}
364364

365365
sb = quotactl_block(special);
366-
if (IS_ERR(sb))
367-
return PTR_ERR(sb);
366+
if (IS_ERR(sb)) {
367+
ret = PTR_ERR(sb);
368+
goto out;
369+
}
368370

369371
ret = do_quotactl(sb, type, cmds, id, addr, pathp);
370372

371373
drop_super(sb);
374+
out:
372375
if (pathp && !IS_ERR(pathp))
373376
path_put(pathp);
374377
return ret;

0 commit comments

Comments
 (0)