$NetBSD: patch-ad,v 1.7 2004/09/09 22:25:16 wiz Exp $ --- lib/sighandle.c.orig 2004-02-03 15:37:50.000000000 +0100 +++ lib/sighandle.c @@ -155,8 +155,10 @@ 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); } return;