diff options
author | 2003-09-20 00:39:39 +0000 | |
---|---|---|
committer | 2003-09-20 00:39:39 +0000 | |
commit | 966719573b0e64cae31b04c93937315adcd67281 (patch) | |
tree | 49f112327c142a3856bcc65f07a4629f580e3b95 /lib/libc/rpc/auth_unix.c | |
parent | In pmap_changebit(), do not flush tlb entries unless really necessary. (diff) | |
download | wireguard-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.c | 5 |
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 |