From 5724f1ae45bc65783462741d7e9d4a707d259379 Mon Sep 17 00:00:00 2001 From: tedu <> Date: Wed, 30 Dec 2015 06:04:39 +0000 Subject: [PATCH] another case where bad things would happen after wrterror --- src/lib/libc/stdlib/malloc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index 84d22507..7d64be89 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/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 * Copyright (c) 2012 Matthew Dempsky @@ -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; }