diff options
author | otto <otto@openbsd.org> | 2020-12-26 13:17:33 +0000 |
---|---|---|
committer | otto <otto@openbsd.org> | 2020-12-26 13:17:33 +0000 |
commit | e85425675158b0b3305d1dde748135080ca0b921 (patch) | |
tree | ac1ac463201f0c48c5e6b46b8d16e9505da8b984 /libexec | |
parent | reuse the calculated vector as the argument to pci_intr_map_msix. (diff) | |
download | wireguard-openbsd-e85425675158b0b3305d1dde748135080ca0b921.tar.xz wireguard-openbsd-e85425675158b0b3305d1dde748135080ca0b921.zip |
Fix a nasty mem leak in ld.so's own malloc. This was hard to diagnose, since
malloc dumping and gdb do not help at all when studying ld.so. In the end
it turns out ot be a simple merge error causing extra mmap calls.
ok miller@ tb@
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ld.so/malloc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libexec/ld.so/malloc.c b/libexec/ld.so/malloc.c index ddbbe225cf2..3dba1283fd2 100644 --- a/libexec/ld.so/malloc.c +++ b/libexec/ld.so/malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc.c,v 1.30 2019/09/30 03:35:09 guenther Exp $ */ +/* $OpenBSD: malloc.c,v 1.31 2020/12/26 13:17:33 otto Exp $ */ /* * Copyright (c) 2008, 2010, 2011 Otto Moerbeek <otto@drijf.net> * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> @@ -582,9 +582,6 @@ omalloc_make_chunks(struct dir_info *d, int bits, int listnum) if (bits == 0 && _dl_mprotect(pp, MALLOC_PAGESIZE, PROT_NONE) < 0) goto err; - bp = alloc_chunk_info(d, bits); - if (bp == NULL) - goto err; bp->page = pp; if (insert(d, (void *)((uintptr_t)pp | (bits + 1)), (uintptr_t)bp)) |