diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-04-17 13:55:14 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-04-17 13:55:14 +0000 |
commit | 1735fc95bba84044d43d4490bd5916d0a52eb876 (patch) | |
tree | 19cc11399694432fd2cc2dcc258bd7bbfc84d2b0 /src/configreader.cpp | |
parent | fbd9bba660330f94e2e9c5b687e0fee25bd8f980 (diff) |
Fix memory leak on rehash: opertype used char* instead of std::string
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11309 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r-- | src/configreader.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index e23f5750d..0fcf88e9d 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -2205,15 +2205,6 @@ bool ValueItem::GetBool() */ bool InitTypes(ServerConfig* conf, const char*) { - if (conf->opertypes.size()) - { - for (opertype_t::iterator n = conf->opertypes.begin(); n != conf->opertypes.end(); n++) - { - if (n->second) - delete[] n->second; - } - } - conf->opertypes.clear(); return true; } @@ -2250,7 +2241,7 @@ bool DoType(ServerConfig* conf, const char*, char**, ValueList &values, int*) const char* TypeName = values[0].GetString(); const char* Classes = values[1].GetString(); - conf->opertypes[TypeName] = strnewdup(Classes); + conf->opertypes[TypeName] = std::string(Classes); return true; } |