Free previously allocated memory.