modify: free alocated memory