diff options
author | Kinglong Mee <kinglongmee@gmail.com> | 2014-01-01 00:35:47 +0800 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-01-06 15:33:54 -0500 |
commit | 60810e5489dffd0bd12e4f99fe9fc330c9a636e1 (patch) | |
tree | 74bb2c76dfd59abd388551c63f406bce04e6f224 /init | |
parent | 0fdc26785d0a5bb33d9adb572307fd2d7a406734 (diff) | |
download | linux-60810e5489dffd0bd12e4f99fe9fc330c9a636e1.tar.gz linux-60810e5489dffd0bd12e4f99fe9fc330c9a636e1.tar.bz2 linux-60810e5489dffd0bd12e4f99fe9fc330c9a636e1.zip |
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 <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'init')
0 files changed, 0 insertions, 0 deletions