mirror of
https://github.com/anope/anope.git
synced 2026-06-29 12:56:38 +02:00
Replaced most uses of smalloc and scalloc with new, replaced most uses of free with delete.
NOTE: This build is unstable due to lack of memory zeroing, this will be addresses in a future commit. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1783 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
+5
-5
@@ -51,10 +51,10 @@ BotInfo::~BotInfo()
|
||||
|
||||
nbots--;
|
||||
|
||||
free(this->nick);
|
||||
free(this->user);
|
||||
free(this->host);
|
||||
free(this->real);
|
||||
delete [] this->nick;
|
||||
delete [] this->user;
|
||||
delete [] this->host;
|
||||
delete [] this->real;
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ void BotInfo::ChangeNick(const char *newnick)
|
||||
botlists[tolower(*this->nick)] = this->next;
|
||||
|
||||
if (this->nick)
|
||||
free(this->nick);
|
||||
delete [] this->nick;
|
||||
this->nick = sstrdup(newnick);
|
||||
|
||||
insert_bot(this);
|
||||
|
||||
Reference in New Issue
Block a user