From 0c3eaeaef58975e0e5ab57adc3a23b7dab142a89 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 23 Jun 2007 18:39:44 +0000 Subject: No no no, the fix to free module factories in loadmodule on error causes a bus error :p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7403 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 08a8cda36..858862e9d 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -965,7 +965,6 @@ bool InspIRCd::LoadModule(const char* filename) { this->Log(DEFAULT,"Unable to load %s: %s",modfile,factory[this->ModCount+1]->LastError()); snprintf(MODERR,MAXBUF,"Loader/Linker error: %s",factory[this->ModCount+1]->LastError()); - delete a; return false; } if ((long)factory[this->ModCount+1]->factory != -1) @@ -977,7 +976,6 @@ bool InspIRCd::LoadModule(const char* filename) if (v.API != API_VERSION) { delete m; - delete a; this->Log(DEFAULT,"Unable to load %s: Incorrect module API version: %d (our version: %d)",modfile,v.API,API_VERSION); snprintf(MODERR,MAXBUF,"Loader/Linker error: Incorrect module API version: %d (our version: %d)",v.API,API_VERSION); return false; @@ -1005,8 +1003,6 @@ bool InspIRCd::LoadModule(const char* filename) { this->Log(DEFAULT,"Unable to load %s",modfile); snprintf(MODERR,MAXBUF,"Factory function failed: Probably missing init_module() entrypoint."); - if (a) - delete a; return false; } } @@ -1014,10 +1010,6 @@ bool InspIRCd::LoadModule(const char* filename) { this->Log(DEFAULT,"Unable to load %s: %s",modfile,modexcept.GetReason()); snprintf(MODERR,MAXBUF,"Factory function of %s threw an exception: %s", modexcept.GetSource(), modexcept.GetReason()); - if (m) - delete m; - if (a) - delete a; return false; } } -- cgit v1.2.3