]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix an unnecessary string copy when reading the <link> tags.
authorPeter Powell <petpow@saberuk.com>
Mon, 13 May 2019 16:49:26 +0000 (17:49 +0100)
committerPeter Powell <petpow@saberuk.com>
Mon, 13 May 2019 23:58:52 +0000 (00:58 +0100)
src/modules/m_spanningtree/utils.cpp

index f78b8d4c02498bebc3aef7d6b86b147de2b6503c..a18ec854ddbcc79cfcfa96641dfc9f92ccefec39 100644 (file)
@@ -258,13 +258,12 @@ void SpanningTreeUtilities::ReadConfiguration()
        {
                ConfigTag* tag = i->second;
                reference<Link> L = new Link(tag);
-               std::string linkname = tag->getString("name");
-               L->Name = linkname.c_str();
 
                irc::spacesepstream sep = tag->getString("allowmask");
                for (std::string s; sep.GetToken(s);)
                        L->AllowMasks.push_back(s);
 
+               L->Name = tag->getString("name");
                L->IPAddr = tag->getString("ipaddr");
                L->Port = tag->getUInt("port", 0);
                L->SendPass = tag->getString("sendpass", tag->getString("password"));