mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
fix(Core/SOAP): mem leak and new/free mismatch (#7181)
Co-Authored-By: Giacomo Pozzoni <giacomopoz@gmail.com>
This commit is contained in:
@@ -42,6 +42,8 @@ void ACSoapThread(const std::string& host, uint16 port)
|
||||
process_message(thread_soap);
|
||||
}
|
||||
|
||||
soap_destroy(&soap);
|
||||
soap_end(&soap);
|
||||
soap_done(&soap);
|
||||
}
|
||||
|
||||
@@ -52,8 +54,7 @@ void process_message(struct soap* soap_message)
|
||||
soap_serve(soap_message);
|
||||
soap_destroy(soap_message); // dealloc C++ data
|
||||
soap_end(soap_message); // dealloc data and clean up
|
||||
soap_done(soap_message); // detach soap struct
|
||||
free(soap_message);
|
||||
soap_free(soap_message); // detach soap struct and fre up the memory
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user