diff options
-rw-r--r-- | src/lib/libc/stdlib/malloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libc/stdlib/malloc.c b/src/lib/libc/stdlib/malloc.c index 618554d293..64273b49fe 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.271 2021/07/23 18:04:28 otto Exp $ */ | 1 | /* $OpenBSD: malloc.c,v 1.272 2021/09/19 09:15:22 tb 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> |
@@ -741,7 +741,7 @@ unmap(struct dir_info *d, void *p, size_t sz, size_t clear) | |||
741 | 741 | ||
742 | /* fill slot */ | 742 | /* fill slot */ |
743 | if (clear > 0) | 743 | if (clear > 0) |
744 | memset(p, 0, clear); | 744 | explicit_bzero(p, clear); |
745 | if (mopts.malloc_freeunmap) | 745 | if (mopts.malloc_freeunmap) |
746 | mprotect(p, sz, PROT_NONE); | 746 | mprotect(p, sz, PROT_NONE); |
747 | else | 747 | else |
@@ -1432,7 +1432,7 @@ ofree(struct dir_info **argpool, void *p, int clear, int check, size_t argsz) | |||
1432 | } | 1432 | } |
1433 | } else if (argsz > 0) { | 1433 | } else if (argsz > 0) { |
1434 | r = find(pool, p); | 1434 | r = find(pool, p); |
1435 | memset(p, 0, argsz); | 1435 | explicit_bzero(p, argsz); |
1436 | } | 1436 | } |
1437 | if (p != NULL) { | 1437 | if (p != NULL) { |
1438 | if (r == NULL) | 1438 | if (r == NULL) |