Wenwen Wang 123c23c6a7 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>
2020-02-04 11:01:54 -05:00
..
2017-11-17 14:18:00 -08:00
2017-11-17 14:18:00 -08:00
2019-02-20 15:14:21 -05:00
2020-02-03 10:43:06 -05:00
2020-01-15 10:15:17 -05:00
2015-04-23 15:16:14 -04:00
2020-02-04 11:01:54 -05:00
2019-10-09 12:05:49 -04:00
2020-01-15 10:54:33 -05:00