Browse Source

oops, assign errno the right way. caught by david running regress tests

OPENBSD_4_5
otto 15 years ago
parent
commit
2fbc2b3c20
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/lib/libc/stdlib/malloc.c

+ 2
- 2
src/lib/libc/stdlib/malloc.c View File

@ -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;
}


Loading…
Cancel
Save