From d0145e03799e484f3a53d79de3b3f34162ee9d3c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Mon, 24 Apr 2006 08:55:46 +0000 Subject: Updated to fedora-glibc-20060424T0820 --- sunrpc/svc_udp.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sunrpc/svc_udp.c') 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; } -- cgit v1.2.3