fix(Core/SOAP): mem leak and new/free mismatch (#7181)

Co-Authored-By: Giacomo Pozzoni <giacomopoz@gmail.com>
This commit is contained in:
Kitzunu 2021-08-06 09:32:51 +02:00 committed by GitHub
parent 2d56a94016
commit ac8dfeef4f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
}
/*