Use the correct free functions with the cudaAlloc for host