]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
autofs4: add missing kfree
authorIan Kent <raven@themaw.net>
Thu, 24 Jul 2008 04:30:19 +0000 (21:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:32 +0000 (10:47 -0700)
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>
fs/autofs4/waitq.c

index cd3b2a67169652c8ba723bcf1aaea4f380ed88f9..1132cc2a0310971bad56dc610f15625a4a61b056 100644 (file)
@@ -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) {