Vendor patch: Prevent bsnmpd from dumping core when a module's init hook

returns an error.

Approved by:	bz (mentor), harti
This commit is contained in:
syrinx 2008-03-07 09:33:29 +00:00
parent fa063e4787
commit 1f644f50df

View File

@ -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);