From: Pavel Shilovsky Date: Thu, 5 Sep 2013 11:04:04 +0000 (+0400) Subject: CIFS: Fix a memory leak when a lease break comes X-Git-Tag: accepted/tizen/common/20141203.182822~1483^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a05096de82f3cd672c76389f63964952678506f;p=platform%2Fkernel%2Flinux-arm64.git 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: Signed-off-by: Pavel Shilovsky Signed-off-by: Steve French --- diff --git a/fs/cifs/smb2misc.c b/fs/cifs/smb2misc.c index 6103359..38c93c3 100644 --- a/fs/cifs/smb2misc.c +++ b/fs/cifs/smb2misc.c @@ -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;