From: Kinglong Mee Date: Tue, 31 Dec 2013 16:35:47 +0000 (+0800) Subject: NFSD: Fix a memory leak in nfsd4_create_session X-Git-Tag: v3.14-rc1~44^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60810e5489dffd0bd12e4f99fe9fc330c9a636e1;p=pandora-kernel.git NFSD: Fix a memory leak in nfsd4_create_session If failed after calling alloc_session but before init_session, nfsd will call __free_session to free se_slots in session. But, session->se_fchannel.maxreqs is not initialized (value is zero). So that, the memory malloced for slots will be lost in free_session_slots for maxreqs is zero. This path sets the information for channel in alloc_session after mallocing slots succeed, instead in init_session. Signed-off-by: Kinglong Mee Signed-off-by: J. Bruce Fields --- Reading git-diff-tree failed