Merge "Fix an issue that a free memory is accessed"