diff options
author | mmcc <mmcc@cvs.openbsd.org> | 2015-10-18 02:39:05 +0000 |
---|---|---|
committer | mmcc <mmcc@cvs.openbsd.org> | 2015-10-18 02:39:05 +0000 |
commit | 0635a3dadf36021d8d48ff8be72d693353968ab3 (patch) | |
tree | 3e01920d937d8761bc8ce783c22542aa2790ff78 /usr.sbin/sasyncd/pfkey.c | |
parent | e8c13c873255c8933830f430dd106b92ee2a1d1a (diff) |
Use explicit_bzero() when the memory is freed directly afterward.
ok deraadt@
Diffstat (limited to 'usr.sbin/sasyncd/pfkey.c')
-rw-r--r-- | usr.sbin/sasyncd/pfkey.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/sasyncd/pfkey.c b/usr.sbin/sasyncd/pfkey.c index 7e91fdc7122..7bc6d810270 100644 --- a/usr.sbin/sasyncd/pfkey.c +++ b/usr.sbin/sasyncd/pfkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkey.c,v 1.24 2015/08/20 22:39:29 deraadt Exp $ */ +/* $OpenBSD: pfkey.c,v 1.25 2015/10/18 02:39:04 mmcc Exp $ */ /* * Copyright (c) 2005 Håkan Olsson. All rights reserved. @@ -496,7 +496,7 @@ pfkey_snapshot(void *v) m->sadb_msg_len * CHUNK, p->name); } } - memset(sadb, 0, sadbsz); + explicit_bzero(sadb, sadbsz); free(sadb); } @@ -527,7 +527,7 @@ pfkey_snapshot(void *v) } } /* Cleanup. */ - memset(spd, 0, spdsz); + explicit_bzero(spd, spdsz); free(spd); } |