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.
Dependencies: NaturalTinyShell_ice libmDot-12Sept mbed-rtos mbed
Fork of ICE by
Diff: src/ConfigurationHandler/Controls/ManualControl.cpp
- Revision:
- 276:851554207c77
- Parent:
- 260:fe726583ba1d
--- a/src/ConfigurationHandler/Controls/ManualControl.cpp Wed Oct 26 20:10:37 2016 +0000
+++ b/src/ConfigurationHandler/Controls/ManualControl.cpp Wed Oct 26 20:31:39 2016 +0000
@@ -57,6 +57,7 @@
!cJSON_HasObjectItem(root, "state") ||
!cJSON_HasObjectItem(root, "percent") ) {
logError("Manual control is missing expected tags\n");
+ cJSON_Delete(root);
return false;
}
@@ -68,6 +69,8 @@
setpoint = atof(cJSON_GetObjectItem(root, "setpoint")->valuestring);
state = atoi(cJSON_GetObjectItem(root, "state")->valuestring);
percent = atoi(cJSON_GetObjectItem(root, "percent")->valuestring);
+
+ cJSON_Delete(root);
return true;
}
