CIFS: Fix a memory leak when a lease break comes

This happens when we receive a lease break from a server, then
find an appropriate lease key in opened files and schedule the
oplock_break slow work. lw pointer isn't freed in this case.

Cc: <stable@vger.kernel.org>
Signed-off-by: Pavel Shilovsky <pshilovsky@samba.org>
Signed-off-by: Steve French <smfrench@gmail.com>
This commit is contained in:
Pavel Shilovsky 2013-09-05 15:04:04 +04:00 committed by Steve French
parent d49ffb0e48
commit 1a05096de8
1 changed files with 1 additions and 0 deletions

View File

@ -477,6 +477,7 @@ smb2_is_valid_lease_break(char *buffer, struct TCP_Server_Info *server)
queue_work(cifsiod_wq, &cfile->oplock_break);
kfree(lw);
spin_unlock(&cifs_file_list_lock);
spin_unlock(&cifs_tcp_ses_lock);
return true;