summaryrefslogtreecommitdiff
path: root/sunrpc/svc_udp.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-04-24 08:55:46 +0000
committerJakub Jelinek <jakub@redhat.com>2006-04-24 08:55:46 +0000
commitd0145e03799e484f3a53d79de3b3f34162ee9d3c (patch)
treed8c51a0952204f9015de0db3319d4c820e8646e0 /sunrpc/svc_udp.c
parentf5ce81c94cc27035f44d37bffa7f7e08dbce7631 (diff)
Updated to fedora-glibc-20060424T0820
Diffstat (limited to 'sunrpc/svc_udp.c')
-rw-r--r--sunrpc/svc_udp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c
index c0c115abeb..67b84f184f 100644
--- a/sunrpc/svc_udp.c
+++ b/sunrpc/svc_udp.c
@@ -485,6 +485,7 @@ svcudp_enablecache (SVCXPRT *transp, u_long size)
uc->uc_entries = ALLOC (cache_ptr, size * SPARSENESS);
if (uc->uc_entries == NULL)
{
+ mem_free (uc, sizeof (struct udp_cache));
CACHE_PERROR (_("enablecache: could not allocate cache data"));
return 0;
}
@@ -492,6 +493,8 @@ svcudp_enablecache (SVCXPRT *transp, u_long size)
uc->uc_fifo = ALLOC (cache_ptr, size);
if (uc->uc_fifo == NULL)
{
+ mem_free (uc->uc_entries, size * SPARSENESS);
+ mem_free (uc, sizeof (struct udp_cache));
CACHE_PERROR (_("enablecache: could not allocate cache fifo"));
return 0;
}
@@ -545,6 +548,7 @@ cache_set (SVCXPRT *xprt, u_long replylen)
newbuf = mem_alloc (su->su_iosz);
if (newbuf == NULL)
{
+ mem_free (victim, sizeof (struct cache_node));
CACHE_PERROR (_("cache_set: could not allocate new rpc_buffer"));
return;
}