$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();
 
