summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2008-10-20 06:19:02 +0000
committerotto <otto@openbsd.org>2008-10-20 06:19:02 +0000
commita244a74fdf99e76280dd3db762913e5bb03e2f97 (patch)
tree65363006ee550d2a3e7c7d5d6f9697e0ad47ed67 /lib/libc
parenttypo, regisrers -> registers (diff)
downloadwireguard-openbsd-a244a74fdf99e76280dd3db762913e5bb03e2f97.tar.xz
wireguard-openbsd-a244a74fdf99e76280dd3db762913e5bb03e2f97.zip
oops, assign errno the right way. caught by david running regress tests
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdlib/malloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c
index 4d196edbe09..3f3ec951d5f 100644
--- a/lib/libc/stdlib/malloc.c
+++ b/lib/libc/stdlib/malloc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: malloc.c,v 1.102 2008/10/03 19:31:49 otto Exp $ */
+/* $OpenBSD: malloc.c,v 1.103 2008/10/20 06:19:02 otto Exp $ */
/*
* Copyright (c) 2008 Otto Moerbeek <otto@drijf.net>
*
@@ -1180,7 +1180,7 @@ malloc(size_t size)
errno = ENOMEM;
}
if (r != NULL)
- saved_errno = errno;
+ errno = saved_errno;
return r;
}