Jump to content

Fix memory leaks in WorldSession::HandleCharCreateOpcode


Guest Anubisss2

Recommended Posts

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;
                        }
                    }

Link to comment
Share on other sites

×
×
  • 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