diff options
Diffstat (limited to 'src/modules/m_ident.cpp')
-rw-r--r-- | src/modules/m_ident.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp index 3fb61e345..25d7d4414 100644 --- a/src/modules/m_ident.cpp +++ b/src/modules/m_ident.cpp @@ -140,8 +140,8 @@ class RFC1413 : public InspSocket { if (u && (Instance->SE->GetRef(ufd) == u)) { - sockaddr* sock_us = new sockaddr; - sockaddr* sock_them = new sockaddr; + sockaddr* sock_us = new sockaddr[2]; + sockaddr* sock_them = new sockaddr[2]; bool success = false; uslen = sizeof(sockaddr_in); themlen = sizeof(sockaddr_in); @@ -160,8 +160,8 @@ class RFC1413 : public InspSocket if (success) { Instance->Log(DEBUG,"BUG: Ident: failed to get socket names"); - delete sock_us; - delete sock_them; + delete[] sock_us; + delete[] sock_them; return false; } else @@ -176,8 +176,8 @@ class RFC1413 : public InspSocket snprintf(ident_request,127,"%d,%d\r\n",ntohs(((sockaddr_in*)sock_them)->sin_port),ntohs(((sockaddr_in*)sock_us)->sin_port)); #endif this->Write(ident_request); - delete sock_us; - delete sock_them; + delete[] sock_us; + delete[] sock_them; return true; } } |