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:
Shteryana Shopova 2008-03-07 09:33:29 +00:00
parent cab70e0247
commit 691f8568ea
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/vendor/bsnmp/dist/; revision=176892
svn path=/vendor/bsnmp/syrinx_20080307_bugfix/; revision=176894; tag=vendor/bsnmp/syrinx_20080307_bugfix

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