Re: [PATCH] NFSv4: Fix a memory leak bug

2019-08-20 Thread Wenwen Wang
On Tue, Aug 20, 2019 at 9:41 AM Schumaker, Anna wrote: > > Hi Wenwen, > > On Tue, 2019-08-20 at 02:54 -0500, Wenwen Wang wrote: > > In nfs4_try_migration(), if nfs4_begin_drain_session() fails, the > > previously allocated 'page' and 'locations' are not deallocated, > > leading to > > memory leaks

Re: [PATCH] NFSv4: Fix a memory leak bug

2019-08-20 Thread Schumaker, Anna
Hi Wenwen, On Tue, 2019-08-20 at 02:54 -0500, Wenwen Wang wrote: > 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, free 'page' and 'locations' before > returning the

[PATCH] NFSv4: Fix a memory leak bug

2019-08-20 Thread Wenwen Wang
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, free 'page' and 'locations' before returning the error. Signed-off-by: Wenwen Wang --- fs/nfs/nfs4state.c | 6 +- 1 f