Correct missing and incorrect calls to cudaMemcpy and cudaMalloc