summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdlib/malloc.c')
-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;
}