aboutsummaryrefslogtreecommitdiff
path: root/src/lib/rpc/svc_tcp.c
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2000-02-18 00:14:12 +0000
committerTom Yu <tlyu@mit.edu>2000-02-18 00:14:12 +0000
commit4c7b4f6ece4284d015b920171442e2f29617073a (patch)
tree5bd5cf94f2b49fc05a12f1841a206fb4fa1daa9a /src/lib/rpc/svc_tcp.c
parent48511d8c90034b7573d6c9e4e1bf65893750f146 (diff)
downloadkrb5-4c7b4f6ece4284d015b920171442e2f29617073a.zip
krb5-4c7b4f6ece4284d015b920171442e2f29617073a.tar.gz
krb5-4c7b4f6ece4284d015b920171442e2f29617073a.tar.bz2
* svc_auth_gssapi.c (_svcauth_gssapi): Don't explicitly free
call_arg on error, since svc_getargs should do that now. * svc_udp.c (svcudp_getargs): Free args on xdr decode error to avoid leaks. * svc_tcp.c (svctcp_getargs): Free args on xdr decode error to avoid leaks. * svc_raw.c (svcraw_getargs): Free args on xdr decode error to avoid leaks. * auth_gssapi.c (auth_gssapi_create): Don't explicitly free call_res anymore, since clnt_call should deal now. * clnt_udp.c (clntudp_call): Free stuff on error from xdr_replymsg() to prevent leaking. * clnt_tcp.c (clnttcp_call): Free stuff on error from xdr_replymsg() to avoid leaking. * clnt_raw.c (clntraw_call): Free stuff on error from xdr_replymsg() to avoid leaking. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12052 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/rpc/svc_tcp.c')
-rw-r--r--src/lib/rpc/svc_tcp.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/rpc/svc_tcp.c b/src/lib/rpc/svc_tcp.c
index 60872c5..cece276 100644
--- a/src/lib/rpc/svc_tcp.c
+++ b/src/lib/rpc/svc_tcp.c
@@ -398,9 +398,13 @@ svctcp_getargs(xprt, xdr_args, args_ptr)
xdrproc_t xdr_args;
caddr_t args_ptr;
{
- return (SVCAUTH_UNWRAP(xprt->xp_auth,
- &(((struct tcp_conn *)(xprt->xp_p1))->xdrs),
- xdr_args, args_ptr));
+ if (! SVCAUTH_UNWRAP(xprt->xp_auth,
+ &(((struct tcp_conn *)(xprt->xp_p1))->xdrs),
+ xdr_args, args_ptr)) {
+ (void)svctcp_freeargs(xprt, xdr_args, args_ptr);
+ return FALSE;
+ }
+ return TRUE;
}
static bool_t