blob: 7d145aeafd86c32980ce2d1acacf13af4d0a7fbd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
$NetBSD: patch-ad,v 1.3 2013/10/14 06:51:02 adam Exp $
--- lib/sighandle.c.orig 2003-10-05 03:49:29.000000000 +0000
+++ lib/sighandle.c
@@ -204,8 +204,10 @@ static RETSIGTYPE SIG_handle (int sig)
this = SIG_handlers[sig];
while (this != (struct SIG_hlist *) NULL)
{
- (*this->handler)(sig);
+ /* handler may free this (and thus clobber this->next) */
+ struct SIG_hlist *current = this;
this = this->next;
+ (*current->handler)(sig);
}
SIG_endCrSect();
|