Leak in nlmsvc_testlock for async GETFL case

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

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
This commit is contained in:
Oleg Drokin 2008-01-11 21:57:35 -05:00 committed by J. Bruce Fields
parent 8838dc43d6
commit 54ca95eb36

View File

@ -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;
}