Fork HTTPClient and Modfiy code for mbed 6.0
Dependents: mbed-demo-http-get-json
Diff: HTTPClient.cpp
- Revision:
- 41:37e7df011c1f
- Parent:
- 38:2ef07232f65c
- Child:
- 42:ab259a9d1d36
--- a/HTTPClient.cpp Tue Mar 14 02:59:32 2017 +0000 +++ b/HTTPClient.cpp Sun Apr 16 20:55:07 2017 +0000 @@ -17,7 +17,7 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -//#include "Utility.h" // private memory manager +#include "Utility.h" // private memory manager #ifndef UTILITY_H #define swMalloc malloc // use the standard #define swFree free @@ -62,6 +62,10 @@ HTTPClient::~HTTPClient() { + if (m_basicAuthUser) + swFree(m_basicAuthUser); + if (m_basicAuthPassword) + swFree(m_basicAuthPassword); if (m_location) // if any redirection was involved, clean up after it. swFree(m_location); m_location = NULL; // this step isn't necessary...