Change-Id: I65f3eef225cc8601b52f99c987c70ce3209f14ea
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
int put_resource_attr_array(struct resource *resource, u_int64_t attr_id)
{
struct resource_attribute_value *attr_value = NULL;
+ struct array_value *array;
if (!check_attr_validate(resource, attr_id, DATA_TYPE_ARRAY))
return -EINVAL;
if (!attr_value || !attr_value->data)
return -EINVAL;
+ array = (struct array_value *)attr_value->data;
+ if (array) {
+ array->type = 0;
+ array->length = 0;
+ free(array->data);
+ array->data = NULL;
+ }
free(attr_value->data);
attr_value->data = NULL;