summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libc/crypt/arc4random.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libc/crypt/arc4random.c b/src/lib/libc/crypt/arc4random.c
index 3b7f34faed..565bfa0333 100644
--- a/src/lib/libc/crypt/arc4random.c
+++ b/src/lib/libc/crypt/arc4random.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: arc4random.c,v 1.45 2014/07/16 00:18:54 deraadt Exp $ */ 1/* $OpenBSD: arc4random.c,v 1.46 2014/07/17 14:30:41 deraadt Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1996, David Mazieres <dm@uun.org> 4 * Copyright (c) 1996, David Mazieres <dm@uun.org>
@@ -69,6 +69,10 @@ static inline void _rs_rekey(u_char *dat, size_t datlen);
69static inline void 69static inline void
70_rs_forkhandler(void) 70_rs_forkhandler(void)
71{ 71{
72 /*
73 * Race-free because we're running single-threaded in a new
74 * address space, and once allocated rs is never deallocated.
75 */
72 if (rs) 76 if (rs)
73 rs->rs_count = 0; 77 rs->rs_count = 0;
74} 78}