SUNRPC: fix some memleaks in gssx_dec_option_array
authorZhipeng Lu <alexious@zju.edu.cn>
Tue, 2 Jan 2024 05:38:13 +0000 (13:38 +0800)
committerChuck Lever <chuck.lever@oracle.com>
Fri, 1 Mar 2024 14:12:04 +0000 (09:12 -0500)
commit3cfcfc102a5e57b021b786a755a38935e357797d
tree3e1648f0b8c7529793dc8a89b10f2c5f69a8ab23
parente67b652d8e8591d3b1e569dbcdfcee15993e91fa
SUNRPC: fix some memleaks in gssx_dec_option_array

The creds and oa->data need to be freed in the error-handling paths after
their allocation. So this patch add these deallocations in the
corresponding paths.

Fixes: 1d658336b05f ("SUNRPC: Add RPC based upcall mechanism for RPCGSS auth")
Signed-off-by: Zhipeng Lu <alexious@zju.edu.cn>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/auth_gss/gss_rpc_xdr.c