Change-Id: I97a2e4c2e5326eb86a836857c0b44eb3b0bc016b
error = smartthings_payload_set_bool(resp_payload, PROP_VALUE, status);
if (error != SMARTTHINGS_RESOURCE_ERROR_NONE) {
_E("smartthings_payload_set_bool() failed, [%d]", error);
error = smartthings_payload_set_bool(resp_payload, PROP_VALUE, status);
if (error != SMARTTHINGS_RESOURCE_ERROR_NONE) {
_E("smartthings_payload_set_bool() failed, [%d]", error);
+ smartthings_payload_destroy(resp_payload);
error = smartthings_resource_notify(st_handle, RES_CAPABILITY_PRESENCESENSOR_MAIN_0, resp_payload);
if (error != SMARTTHINGS_RESOURCE_ERROR_NONE) {
_E("smartthings_resource_notify() failed, [%d]", error);
error = smartthings_resource_notify(st_handle, RES_CAPABILITY_PRESENCESENSOR_MAIN_0, resp_payload);
if (error != SMARTTHINGS_RESOURCE_ERROR_NONE) {
_E("smartthings_resource_notify() failed, [%d]", error);
+ smartthings_payload_destroy(resp_payload);