summaryrefslogtreecommitdiff
path: root/src/network/packethandlers/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/packethandlers/client.cpp')
-rw-r--r--src/network/packethandlers/client.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/packethandlers/client.cpp b/src/network/packethandlers/client.cpp
index 838c85989..5acf04f91 100644
--- a/src/network/packethandlers/client.cpp
+++ b/src/network/packethandlers/client.cpp
@@ -77,8 +77,8 @@ void Client::handleCommand_AuthAccept(NetworkPacket* pkt)
<< m_recommended_send_interval<<std::endl;
// Reply to server
- NetworkPacket* resp_pkt = new NetworkPacket(TOSERVER_INIT2, 0);
- Send(resp_pkt);
+ NetworkPacket resp_pkt(TOSERVER_INIT2, 0);
+ Send(&resp_pkt);
m_state = LC_Init;
}
@@ -128,8 +128,8 @@ void Client::handleCommand_InitLegacy(NetworkPacket* pkt)
}
// Reply to server
- NetworkPacket* resp_pkt = new NetworkPacket(TOSERVER_INIT2, 0);
- Send(resp_pkt);
+ NetworkPacket resp_pkt(TOSERVER_INIT2, 0);
+ Send(&resp_pkt);
m_state = LC_Init;
}