summaryrefslogtreecommitdiff
path: root/sunrpc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-05-05 06:11:55 +0000
committerJakub Jelinek <jakub@redhat.com>2006-05-05 06:11:55 +0000
commit3f898a85fc15daad530ca7db852e7d724e3914b5 (patch)
treeaea4ca88f192663618dacf8b3fb9e7f5f1fe527b /sunrpc
parentbaba5d9461d4e8a581ac26fe4412ad783ffc73e7 (diff)
Updated to fedora-glibc-20060505T0554cvs/fedora-glibc-2_4_90-5
Diffstat (limited to 'sunrpc')
-rw-r--r--sunrpc/key_call.c5
-rw-r--r--sunrpc/rpc_thread.c5
-rw-r--r--sunrpc/xdr_array.c7
3 files changed, 9 insertions, 8 deletions
diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c
index 77c0ce18b9..63293aefa5 100644
--- a/sunrpc/key_call.c
+++ b/sunrpc/key_call.c
@@ -552,8 +552,11 @@ __rpc_thread_key_cleanup (void)
struct key_call_private *kcp = RPC_THREAD_VARIABLE(key_call_private_s);
if (kcp) {
- if (kcp->client)
+ if (kcp->client) {
+ if (kcp->client->cl_auth)
+ auth_destroy (kcp->client->cl_auth);
clnt_destroy(kcp->client);
+ }
free (kcp);
}
}
diff --git a/sunrpc/rpc_thread.c b/sunrpc/rpc_thread.c
index fbc1cf72fe..91e94c2eab 100644
--- a/sunrpc/rpc_thread.c
+++ b/sunrpc/rpc_thread.c
@@ -20,7 +20,7 @@ __rpc_thread_destroy (void)
{
struct rpc_thread_variables *tvp = __libc_tsd_get (RPC_VARS);
- if (tvp != NULL && tvp != &__libc_tsd_RPC_VARS_mem) {
+ if (tvp != NULL) {
__rpc_thread_svc_cleanup ();
__rpc_thread_clnt_cleanup ();
__rpc_thread_key_cleanup ();
@@ -29,7 +29,8 @@ __rpc_thread_destroy (void)
free (tvp->svcraw_private_s);
free (tvp->authdes_cache_s);
free (tvp->authdes_lru_s);
- free (tvp);
+ if (tvp != &__libc_tsd_RPC_VARS_mem)
+ free (tvp);
__libc_tsd_set (RPC_VARS, NULL);
}
}
diff --git a/sunrpc/xdr_array.c b/sunrpc/xdr_array.c
index 765f8995d3..44abdbcfda 100644
--- a/sunrpc/xdr_array.c
+++ b/sunrpc/xdr_array.c
@@ -74,7 +74,6 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc)
caddr_t target = *addrp;
u_int c; /* the actual element count */
bool_t stat = TRUE;
- u_int nodesize;
/* like strings, arrays are really counted arrays */
if (!INTUSE(xdr_u_int) (xdrs, sizep))
@@ -90,7 +89,6 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc)
{
return FALSE;
}
- nodesize = c * elsize;
/*
* if we are deserializing, we may need to allocate an array.
@@ -102,13 +100,12 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc)
case XDR_DECODE:
if (c == 0)
return TRUE;
- *addrp = target = mem_alloc (nodesize);
+ *addrp = target = calloc (c, elsize);
if (target == NULL)
{
(void) __fxprintf (NULL, "%s", _("xdr_array: out of memory\n"));
return FALSE;
}
- __bzero (target, nodesize);
break;
case XDR_FREE:
@@ -131,7 +128,7 @@ xdr_array (xdrs, addrp, sizep, maxsize, elsize, elproc)
*/
if (xdrs->x_op == XDR_FREE)
{
- mem_free (*addrp, nodesize);
+ mem_free (*addrp, c * elsize);
*addrp = NULL;
}
return stat;