diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2015-12-30 06:04:40 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2015-12-30 06:04:40 +0000 |
commit | 2c0ae468211f08c5cf2673f6d7430d8ab8c4e3d6 (patch) | |
tree | 700d7ecfbeb2c3483a1e3306ac4cdd6a67a8c867 /lib/libc/stdlib/malloc.c | |
parent | f6bc71699ce5e7d260be208020c062c3283bc7d1 (diff) |
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; } |