diff options
author | jsing <> | 2017-10-19 16:34:33 +0000 |
---|---|---|
committer | jsing <> | 2017-10-19 16:34:33 +0000 |
commit | 838a68bd3008e28bcae263d36c56ef8f4c19c9a9 (patch) | |
tree | 5c08301140229a33133823c929d1e17dfe2d3089 /src/lib | |
parent | d0fbbfe573ca35f1c6844460ff847079ce06d646 (diff) | |
download | openbsd-838a68bd3008e28bcae263d36c56ef8f4c19c9a9.tar.gz openbsd-838a68bd3008e28bcae263d36c56ef8f4c19c9a9.tar.bz2 openbsd-838a68bd3008e28bcae263d36c56ef8f4c19c9a9.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 'src/lib')
-rw-r--r-- | src/lib/libc/stdlib/malloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index 0d43ad8a13..851f585553 100644 --- a/src/lib/libc/stdlib/malloc.c +++ b/src/lib/libc/stdlib/malloc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: malloc.c,v 1.234 2017/10/05 04:44:49 otto Exp $ */ | 1 | /* $OpenBSD: malloc.c,v 1.235 2017/10/19 16:34:33 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto@drijf.net> | 3 | * Copyright (c) 2008, 2010, 2011, 2016 Otto Moerbeek <otto@drijf.net> |
4 | * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> | 4 | * Copyright (c) 2012 Matthew Dempsky <matthew@openbsd.org> |
@@ -1458,6 +1458,7 @@ freezero(void *ptr, size_t sz) | |||
1458 | 1458 | ||
1459 | if (!mopts.internal_funcs) { | 1459 | if (!mopts.internal_funcs) { |
1460 | freezero_p(ptr, sz); | 1460 | freezero_p(ptr, sz); |
1461 | return; | ||
1461 | } | 1462 | } |
1462 | 1463 | ||
1463 | d = getpool(); | 1464 | d = getpool(); |