~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/module/registry.cc

  • Committer: LinuxJedi
  • Date: 2010-08-12 17:36:08 UTC
  • mto: (1735.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1736.
  • Revision ID: linuxjedi@linuxjedi-laptop-20100812173608-ccr246iaa8gv3s97
Remove module pointer from registry when module doesn't load to avoid a double-free on shutdown.

Show diffs side-by-side

added added

removed removed

Lines of Context:
91
91
  module_map[add_str]= handle;
92
92
}
93
93
 
 
94
void module::Registry::remove(module::Module *handle)
 
95
{
 
96
  string remove_str(handle->getName());
 
97
  transform(remove_str.begin(), remove_str.end(),
 
98
            remove_str.begin(), ::tolower);
 
99
 
 
100
  module_map.erase(remove_str);
 
101
}
94
102
 
95
103
vector<module::Module *> module::Registry::getList(bool active)
96
104
{