summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-13 21:34:28 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-13 21:34:28 +0000
commit28eb93f09676e346eefb5c7f588ba5e15f9bdc9e (patch)
tree7e820661f48154f80c21bf25db56a4620378c388 /src
parent9422f4157ccff0482cd70105ada3bd9325455eaa (diff)
This fixes a deletion error here, we were using new[] and not using delete[], but delete instead.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8157 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_conn_waitpong.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/m_conn_waitpong.cpp b/src/modules/m_conn_waitpong.cpp
index 51571072e..11e55cf68 100644
--- a/src/modules/m_conn_waitpong.cpp
+++ b/src/modules/m_conn_waitpong.cpp
@@ -73,16 +73,16 @@ class ModuleWaitPong : public Module
virtual int OnPreCommand(const std::string &command, const char** parameters, int pcnt, userrec* user, bool validated, const std::string &original_line)
{
- if(command == "PONG")
+ if (command == "PONG")
{
char* pingrpl;
user->GetExt(extenstr, pingrpl);
- if(pingrpl)
+ if (pingrpl)
{
- if(strcmp(pingrpl, parameters[0]) == 0)
+ if (strcmp(pingrpl, parameters[0]) == 0)
{
- DELETE(pingrpl);
+ delete[] pingrpl;
user->Shrink(extenstr);
return 1;
}
@@ -108,24 +108,24 @@ class ModuleWaitPong : public Module
char* pingrpl;
user->GetExt(extenstr, pingrpl);
- if(pingrpl)
+ if (pingrpl)
{
- DELETE(pingrpl);
+ delete[] pingrpl;
user->Shrink(extenstr);
}
}
virtual void OnCleanup(int target_type, void* item)
{
- if(target_type == TYPE_USER)
+ if (target_type == TYPE_USER)
{
userrec* user = (userrec*)item;
char* pingrpl;
user->GetExt(extenstr, pingrpl);
- if(pingrpl)
+ if (pingrpl)
{
- DELETE(pingrpl);
+ delete[] pingrpl;
user->Shrink(extenstr);
}
}