Jump to content

Fix memory leaks in WorldSession::HandleCharCreateOpcode


Recommended Posts

Posted

Rev/hash: r9203/dbb46f6a1b86b9c1cfcce014c8740852cf8f5783

What fix: Fix 2 mem leakz.

Author: Anubisss

Paste: http://pastebin.com/f19c8306

src/game/CharacterHandler.cpp |    2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp
index 6d428f3..e118acd 100644
--- a/src/game/CharacterHandler.cpp
+++ b/src/game/CharacterHandler.cpp
@@ -359,6 +359,7 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )
                    {
                        data << (uint8)CHAR_CREATE_UNIQUE_CLASS_LIMIT;
                        SendPacket( &data );
+                        delete result2;
                        return;
                    }
                }
@@ -413,6 +414,7 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )
                        {
                            data << (uint8)CHAR_CREATE_UNIQUE_CLASS_LIMIT;
                            SendPacket( &data );
+                            delete result2;
                            return;
                        }
                    }

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use