From 1f644f50df15b6258b1b2782f9f02d44f13df0bf Mon Sep 17 00:00:00 2001 From: syrinx Date: Fri, 7 Mar 2008 09:33:29 +0000 Subject: [PATCH] Vendor patch: Prevent bsnmpd from dumping core when a module's init hook returns an error. Approved by: bz (mentor), harti --- contrib/bsnmp/snmpd/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/bsnmp/snmpd/main.c b/contrib/bsnmp/snmpd/main.c index b183d7f56b1a..e3660c109952 100644 --- a/contrib/bsnmp/snmpd/main.c +++ b/contrib/bsnmp/snmpd/main.c @@ -2242,6 +2242,8 @@ lm_load(const char *path, const char *section) return (m); err: + if ((m->flags & LM_ONSTARTLIST) != 0) + TAILQ_REMOVE(&modules_start, m, start); if (m->handle) dlclose(m->handle); free(m->path);