diff options
author | 2015-12-30 06:04:39 +0000 | |
---|---|---|
committer | 2015-12-30 06:04:39 +0000 | |
commit | 03b3d6f7ee12d2e5d6d53ad8939c7ee1a864b4d2 (patch) | |
tree | 30e4abdaf0be7430c419c618d7986b90a31d5fdd /lib/libc/stdlib/malloc.c | |
parent | if somebody makes the mistake of disabling abort, don't deref null in (diff) | |
download | wireguard-openbsd-03b3d6f7ee12d2e5d6d53ad8939c7ee1a864b4d2.tar.xz wireguard-openbsd-03b3d6f7ee12d2e5d6d53ad8939c7ee1a864b4d2.zip |
another case where bad things would happen after wrterror
Diffstat (limited to 'lib/libc/stdlib/malloc.c')
-rw-r--r-- | lib/libc/stdlib/malloc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index 84d22507c0d..7d64be89a9e 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc.c,v 1.178 2015/12/30 06:01:18 tedu Exp $ */ +/* $OpenBSD: malloc.c,v 1.179 2015/12/30 06:04:39 tedu Exp $ */ /* * Copyright (c) 2008, 2010, 2011 Otto Moerbeek <otto@drijf.net> * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> @@ -1919,8 +1919,10 @@ malloc_dump(int fd) if (p == NULL) continue; r = find(pool, p); - if (r == NULL) + if (r == NULL) { wrterror("bogus pointer in malloc_dump", p); + continue; + } free_bytes(pool, r, p); pool->delayed_chunks[i] = NULL; } |