From 88de4fbdc4fa41e45c9984b27210a338e1c2de2f Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Sat, 22 Oct 2022 15:21:25 +0000 Subject: In __cxa_atexit(), there is no need to initialize local pointer before the lock, when it is correctly initialized after the lock ok otto millert --- src/lib/libc/stdlib/atexit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libc/stdlib/atexit.c b/src/lib/libc/stdlib/atexit.c index ea9dd129c1..81d2dc2476 100644 --- a/src/lib/libc/stdlib/atexit.c +++ b/src/lib/libc/stdlib/atexit.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atexit.c,v 1.27 2017/12/16 20:06:56 guenther Exp $ */ +/* $OpenBSD: atexit.c,v 1.28 2022/10/22 15:21:25 deraadt Exp $ */ /* * Copyright (c) 2002 Daniel Hartmeier * All rights reserved. @@ -67,7 +67,7 @@ struct atfork_listhead _atfork_list = TAILQ_HEAD_INITIALIZER(_atfork_list); int __cxa_atexit(void (*func)(void *), void *arg, void *dso) { - struct atexit *p = __atexit; + struct atexit *p; struct atexit_fn *fnp; int pgsize = getpagesize(); int ret = -1; -- cgit v1.2.3-55-g6feb