summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc/rpc_callmsg.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2001-03-03 06:50:27 +0000
committerderaadt <deraadt@openbsd.org>2001-03-03 06:50:27 +0000
commitf590e579b16597178d79f88279cc43193cd1a94d (patch)
tree873f81746225d7748ed10b52f93f968f254c0285 /lib/libc/rpc/rpc_callmsg.c
parentChange ownership of mux devices also, eventually X will move to (diff)
downloadwireguard-openbsd-f590e579b16597178d79f88279cc43193cd1a94d.tar.xz
wireguard-openbsd-f590e579b16597178d79f88279cc43193cd1a94d.zip
plug many memory leaks
Diffstat (limited to 'lib/libc/rpc/rpc_callmsg.c')
-rw-r--r--lib/libc/rpc/rpc_callmsg.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libc/rpc/rpc_callmsg.c b/lib/libc/rpc/rpc_callmsg.c
index 5490ddb7230..69f9dd9cea4 100644
--- a/lib/libc/rpc/rpc_callmsg.c
+++ b/lib/libc/rpc/rpc_callmsg.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: rpc_callmsg.c,v 1.5 1999/11/23 22:37:27 deraadt Exp $";
+static char *rcsid = "$OpenBSD: rpc_callmsg.c,v 1.6 2001/03/03 06:50:28 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -123,7 +123,8 @@ xdr_callmsg(xdrs, cmsg)
if (oa->oa_base == NULL) {
oa->oa_base = (caddr_t)
mem_alloc(oa->oa_length);
- /* XXX */
+ if (oa->oa_base == NULL)
+ return (FALSE);
}
buf = XDR_INLINE(xdrs, RNDUP(oa->oa_length));
if (buf == NULL) {
@@ -158,7 +159,8 @@ xdr_callmsg(xdrs, cmsg)
if (oa->oa_base == NULL) {
oa->oa_base = (caddr_t)
mem_alloc(oa->oa_length);
- /* XXX */
+ if (oa->oa_base == NULL)
+ return (FALSE);
}
buf = XDR_INLINE(xdrs, RNDUP(oa->oa_length));
if (buf == NULL) {