diff options
author | 2017-10-19 16:34:33 +0000 | |
---|---|---|
committer | 2017-10-19 16:34:33 +0000 | |
commit | aaa9311bc723957353f219b1bfb773cef10120a2 (patch) | |
tree | d7ba5e25efeaf5ecc69a01bb707343a56c5c810b /lib/libc/stdlib/malloc.c | |
parent | Nuke special case for '\n' in skip_to_semi() and (diff) | |
download | wireguard-openbsd-aaa9311bc723957353f219b1bfb773cef10120a2.tar.xz wireguard-openbsd-aaa9311bc723957353f219b1bfb773cef10120a2.zip |
Restore a return that was inadvertently removed from freezero() in r1.234,
which results in an internal double free when internal functions are not
in use.
ok otto@
Diffstat (limited to 'lib/libc/stdlib/malloc.c')
-rw-r--r-- | lib/libc/stdlib/malloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/stdlib/malloc.c b/lib/libc/stdlib/malloc.c index 0d43ad8a13f..851f5855538 100644 --- a/lib/libc/stdlib/malloc.c +++ b/lib/libc/stdlib/malloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: malloc.c,v 1.234 2017/10/05 04:44:49 otto Exp $ */ +/* $OpenBSD: malloc.c,v 1.235 2017/10/19 16:34:33 jsing Exp $ */ /* * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto@drijf.net> * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> @@ -1458,6 +1458,7 @@ freezero(void *ptr, size_t sz) if (!mopts.internal_funcs) { freezero_p(ptr, sz); + return; } d = getpool(); |