1d4a211d6c
The code was checking the same device pointer instead of checking that both allocations are successful. Pull Request: https://projects.blender.org/blender/blender/pulls/135977