To reuse it again
[model] Redwood,Kiran,B3(Wearable)
[binary_type] AP
[customer] Docomo/Orange/ATT/Open
[issue#] N/A
[problem]
[cause]
[solution]
[team] HomeTF
[request]
[horizontal_expansion]
Change-Id: Idc514793b00916f8a04e4bfa1b8638b75a37368e
int idx;
if (!info->resource_array) {
- info->resource_array = calloc(sizeof(*info->resource_array), DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT);
+ info->resource_array = calloc(DYNAMICBOX_CONF_EXTRA_BUFFER_COUNT, sizeof(*info->resource_array));
if (!info->resource_array) {
ErrPrint("Out of memory: %s\n", strerror(errno));
return 0u;
if (dynamicbox_release_extra_buffer(info->handle, idx) < 0) {
DbgPrint("Failed to release buffer\n");
}
+ info->resource_array[idx] = 0u;
info->resource_cnt--;
break;
}