Skip to contentSkip to conversation

autofs4 - add missing kfree

PATCH In review Ian Kent 2 participants 2 messages Jun 20, 2008

Subsystems (2)
lore
Share & tools
lore

Ian Kent

author maintainer
#0 lore raw

PATCH 1/1 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.

My appologies for this mistake.

Ian

---

 fs/autofs4/waitq.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
fs/autofs4/waitq.c +3 -1
index ae637d9..d291b07 100644
@@ -328,8 +328,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) {
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Ian Kent

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.

Yeah, missed that in the translation to the embedded qstr.

Quoted 3 lines

Ian