Fix allocation bug of characteristics buffer

We need to allocate bytes as items multiplied by size of char_info_t,
but in realloc we were not doing this.