changes:
* fix issue when free memory (reason: when allocate memory, the size is not correct)