From 28eb93f09676e346eefb5c7f588ba5e15f9bdc9e Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 13 Oct 2007 21:34:28 +0000 Subject: 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 --- src/modules/m_conn_waitpong.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/modules') 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); } } -- cgit v1.2.3