Change-Id: I919a78b40a731a19572a0093c3b635f69221a800
const char *iface)
{
GList *node;
+ char *node_data;
RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == ifaces, IOTCON_ERROR_INVALID_PARAMETER);
return IOTCON_ERROR_NO_DATA;
}
+ node_data = node->data;
ifaces->iface_list = g_list_delete_link(ifaces->iface_list, node);
- free(node->data);
+ free(node_data);
return IOTCON_ERROR_NONE;
}
API int iotcon_resource_types_remove(iotcon_resource_types_h types, const char *type)
{
GList *found_node;
+ char *node_data;
RETV_IF(false == ic_utils_check_oic_feature_supported(), IOTCON_ERROR_NOT_SUPPORTED);
RETV_IF(NULL == types, IOTCON_ERROR_INVALID_PARAMETER);
return IOTCON_ERROR_NO_DATA;
}
+ node_data = found_node->data;
types->type_list = g_list_delete_link(types->type_list, found_node);
- free(found_node->data);
+ free(node_data);
return IOTCON_ERROR_NONE;
}