fix(Core/SOAP): mem leak and new/free mismatch (#7181)
Co-Authored-By: Giacomo Pozzoni <giacomopoz@gmail.com>
This commit is contained in:
parent
2d56a94016
commit
ac8dfeef4f
1 changed files with 3 additions and 2 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue