aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorWenwen Wang <wenwen@cs.uga.edu>2020-02-03 03:47:53 +0000
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2020-02-04 11:01:54 -0500
commit123c23c6a7b7ecd2a3d6060bea1d94019f71fd66 (patch)
tree0d2b6da1eb64a408a01cde105c180853c24048ad /fs/nfs/nfs4proc.c
parentnfs: optimise readdir cache page invalidation (diff)
downloadlinux-dev-123c23c6a7b7ecd2a3d6060bea1d94019f71fd66.tar.xz
linux-dev-123c23c6a7b7ecd2a3d6060bea1d94019f71fd66.zip
NFS: Fix memory leaks
In _nfs42_proc_copy(), 'res->commit_res.verf' is allocated through kzalloc() if 'args->sync' is true. In the following code, if 'res->synchronous' is false, handle_async_copy() will be invoked. If an error occurs during the invocation, the following code will not be executed and the error will be returned . However, the allocated 'res->commit_res.verf' is not deallocated, leading to a memory leak. This is also true if the invocation of process_copy_commit() returns an error. To fix the above leaks, redirect the execution to the 'out' label if an error is encountered. Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
0 files changed, 0 insertions, 0 deletions