SIGN IN SIGN UP

hwdec_cuda: fix partial failure edge cases in error paths

The slopbot spam did find valid issues in the error paths in this code, and as
part of verifying them, I have additional fixes.

* ensure that the return value -1 from `cuda_init()` if `ext_init()` fails
* zero alloc the `ext_vk` and `ext_gl` structs so that we have a known initial
  state
* explicitly initialise the `sem_handle.fd` to -1 to ensure we don't
  accidentally close stdin in the error path. But also don't do this on
  windows as an invalid Handle is 0.
* Don't do a double `cuCtxPopCurrent()` in the `ext_gl` init failure path

Fixes #17976, #17988, #17989
P
Philip Langdale committed
89b95243ef1590ae06d17c2e3deeb1d82098a941
Parent: 427e4bf