Skip to content

Commit

Permalink
autofs4: add missing kfree
Browse files Browse the repository at this point in the history
It see that the patch tittled "autofs4 - fix pending mount race" is
missing a change that I had recently made.

It's missing a kfree for the case mutex_lock_interruptible() fails
to aquire the wait queue mutex.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Ian Kent authored and Linus Torvalds committed Jul 24, 2008
1 parent a1362fe commit f4c7da0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/autofs4/waitq.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,10 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
qstr.name = name;
qstr.hash = full_name_hash(name, qstr.len);

if (mutex_lock_interruptible(&sbi->wq_mutex))
if (mutex_lock_interruptible(&sbi->wq_mutex)) {
kfree(qstr.name);
return -EINTR;
}

ret = validate_request(&wq, sbi, &qstr, dentry, notify);
if (ret <= 0) {
Expand Down

0 comments on commit f4c7da0

Please sign in to comment.