diff mbox

lockd: release memory for non-normal situation

Message ID 201011221243.oAM931FO003822@rcsinet13.oracle.com (mailing list archive)
State Accepted, archived
Delegated to: Trond Myklebust
Headers show

Commit Message

Wengang Wang Nov. 22, 2010, 12:40 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
index 332c54c..ec9f0f5 100644
--- a/fs/lockd/clntproc.c
+++ b/fs/lockd/clntproc.c
@@ -173,8 +173,10 @@  int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl)
 			status = nlmclnt_unlock(call, fl);
 	} else if (IS_GETLK(cmd))
 		status = nlmclnt_test(call, fl);
-	else
+	else {
+		nlm_release_call(call);
 		status = -EINVAL;
+	}
 	fl->fl_ops->fl_release_private(fl);
 	fl->fl_ops = NULL;