NFSv4: Fix a memory leak bug
authorWenwen Wang <wenwen@cs.uga.edu>
Wed, 21 Aug 2019 03:21:21 +0000 (22:21 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 21 Aug 2019 20:39:29 +0000 (16:39 -0400)
commit1e672e3644940d83bd94e7cb46bac6bb3627de02
treec0c89d96442a7b4bcca9cfad564447131ba5d3ef
parent435eba4ae0692e2f3d62988f8648efd65c935b6a
NFSv4: Fix a memory leak bug

In nfs4_try_migration(), if nfs4_begin_drain_session() fails, the
previously allocated 'page' and 'locations' are not deallocated, leading to
memory leaks. To fix this issue, go to the 'out' label to free 'page' and
'locations' before returning the error.

Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/nfs4state.c