summaryrefslogtreecommitdiffstats
path: root/lib/libc/rpc/auth_unix.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2003-09-20 00:39:39 +0000
committerderaadt <deraadt@openbsd.org>2003-09-20 00:39:39 +0000
commit966719573b0e64cae31b04c93937315adcd67281 (patch)
tree49f112327c142a3856bcc65f07a4629f580e3b95 /lib/libc/rpc/auth_unix.c
parentIn pmap_changebit(), do not flush tlb entries unless really necessary. (diff)
downloadwireguard-openbsd-966719573b0e64cae31b04c93937315adcd67281.tar.xz
wireguard-openbsd-966719573b0e64cae31b04c93937315adcd67281.zip
do not leak if mem_alloc fails
Diffstat (limited to 'lib/libc/rpc/auth_unix.c')
-rw-r--r--lib/libc/rpc/auth_unix.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/rpc/auth_unix.c b/lib/libc/rpc/auth_unix.c
index 7b55938d379..b63894f9473 100644
--- a/lib/libc/rpc/auth_unix.c
+++ b/lib/libc/rpc/auth_unix.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: auth_unix.c,v 1.15 2002/01/02 23:00:10 deraadt Exp $";
+static char *rcsid = "$OpenBSD: auth_unix.c,v 1.16 2003/09/20 00:39:39 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -152,6 +152,9 @@ authunix_create(machname, uid, gid, len, aup_gids)
#else
if ((au->au_origcred.oa_base = mem_alloc((u_int) len)) == NULL) {
(void)fprintf(stderr, "authunix_create: out of memory\n");
+ XDR_DESTROY(&xdrs);
+ free(au);
+ free(auth);
return (NULL);
}
#endif