Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: source/http_response.h
- Revision:
- 18:f7a85895a941
- Parent:
- 15:ffc77f212382
- Child:
- 29:383e9bfbfbed
- Child:
- 31:b3730a2c4f39
--- a/source/http_response.h Mon Jul 31 15:36:33 2017 +0200
+++ b/source/http_response.h Mon Sep 04 16:31:38 2017 +0100
@@ -142,7 +142,13 @@
body = (char*)malloc(length);
}
else {
+ char* original_body = body;
body = (char*)realloc(body, body_offset + length);
+ if (body == NULL) {
+ printf("[HttpResponse] realloc for %d bytes failed\n", body_offset + length);
+ free(original_body);
+ return;
+ }
}
}