I try to do a deep copy to a char* and then fee the copied string but the new char* also free. The function get variable who is void*, I do casting to char* in the start. I