瀏覽代碼

autofs4: add missing kfree

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>
Ian Kent 17 年之前
父節點
當前提交
f4c7da0261
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      fs/autofs4/waitq.c

+ 3 - 1
fs/autofs4/waitq.c

@@ -332,8 +332,10 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
 	qstr.name = name;
 	qstr.name = name;
 	qstr.hash = full_name_hash(name, qstr.len);
 	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;
 		return -EINTR;
+	}
 
 
 	ret = validate_request(&wq, sbi, &qstr, dentry, notify);
 	ret = validate_request(&wq, sbi, &qstr, dentry, notify);
 	if (ret <= 0) {
 	if (ret <= 0) {