Deleting to free memory
Fixed malloc