Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 54ca95eb authored by Oleg Drokin's avatar Oleg Drokin Committed by J. Bruce Fields
Browse files

Leak in nlmsvc_testlock for async GETFL case



Fix nlm_block leak for the case of supplied blocking lock info.

Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 8838dc43
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -505,12 +505,12 @@ nlmsvc_testlock(struct svc_rqst *rqstp, struct nlm_file *file,
			goto out;
		}
		if (block->b_flags & B_GOT_CALLBACK) {
			nlmsvc_unlink_block(block);
			if (block->b_fl != NULL
					&& block->b_fl->fl_type != F_UNLCK) {
				lock->fl = *block->b_fl;
				goto conf_lock;
			} else {
				nlmsvc_unlink_block(block);
				ret = nlm_granted;
				goto out;
			}