summary refs log tree commit diff
path: root/sunrpc/svc_udp.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-22 17:00:32 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-22 17:00:32 +0000
commit2e3e5db6680de463d6e8b43ec8bc5e131a99a700 (patch)
tree71cd951783f91da3b855613d34008f50605a2b8f /sunrpc/svc_udp.c
parent59adeb11a2fde39f687e02126c7dd64d44d9b11b (diff)
downloadglibc-2e3e5db6680de463d6e8b43ec8bc5e131a99a700.tar.gz
glibc-2e3e5db6680de463d6e8b43ec8bc5e131a99a700.tar.xz
glibc-2e3e5db6680de463d6e8b43ec8bc5e131a99a700.zip
Update.
2001-08-22  Jakub Jelinek  <jakub@redhat.com>

	* sunrpc/xdr_rec.c (xdrrec_create): Fix buf sizes before allocating
	buf.  Free resources on failure.
	* sunrpc/svc_unix.c (svcunix_create): Free resources on failure.
	(makefd_xprt): Likewise.
	* sunrpc/svc_udp.c (svcudp_bufcreate): Likewise.
	* sunrpc/svc_tcp.c (svctcp_create, makefd_xprt): Likewise.
	* sunrpc/auth_unix.c (authunix_create): Likewise.

2001-08-21  Jakub Jelinek  <jakub@redhat.com>

	* string/strnlen.c: Remove.
	* sysdeps/generic/strnlen.c: New.
	* sysdeps/i386/i486/bits/string.h (strnlen): Remove.
Diffstat (limited to 'sunrpc/svc_udp.c')
-rw-r--r--sunrpc/svc_udp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sunrpc/svc_udp.c b/sunrpc/svc_udp.c
index f8ea76c0b8..17c4977e96 100644
--- a/sunrpc/svc_udp.c
+++ b/sunrpc/svc_udp.c
@@ -156,6 +156,9 @@ svcudp_bufcreate (sock, sendsz, recvsz)
       else
 #endif
 	(void) fputs (_("svcudp_create: out of memory\n"), stderr);
+      mem_free (xprt, sizeof (SVCXPRT));
+      mem_free (su, sizeof (*su));
+      mem_free (buf, ((MAX (sendsz, recvsz) + 3) / 4) * 4);
       return NULL;
     }
   su->su_iosz = ((MAX (sendsz, recvsz) + 3) / 4) * 4;