Hardware Monitor: In case NVML initialization failed, do not try to initialiaze NVAPI or XNVCTRL because they both depend on NVML

pull/1114/head
jsteube 7 years ago
parent 30e3ad60fd
commit 0aca372ce8

@ -66,6 +66,7 @@
- Events: Improved the maximum event message handling. event_log () will now also internally make sure that the message is properly terminated
- Files: Do several file and folder checks on startup rather than when they are actually used to avoid related error after eventual intense operations
- Helper: Added functions to check existence, type, read- and write-permissions and rewrite sources to use them instead of stat()
- Hardware Monitor: In case NVML initialization failed, do not try to initialiaze NVAPI or XNVCTRL because they both depend on NVML
- Hardware Monitor: Fixed several memory leaks in case no hardware monitor sensor is found
- Hardware Monitor: Fixed several memory leaks in case hash-file writing (caused by --remove) failed
- Mask Increment: Fixed memory leak in case mask_append() fails

@ -3354,7 +3354,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
}
}
if (opencl_ctx->need_nvapi == true)
if ((opencl_ctx->need_nvapi == true) && (hwmon_ctx->hm_nvml)) // nvapi can't work alone, we need nvml, too
{
hwmon_ctx->hm_nvapi = (NVAPI_PTR *) hcmalloc (sizeof (NVAPI_PTR));
@ -3366,7 +3366,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
}
}
if (opencl_ctx->need_xnvctrl == true)
if ((opencl_ctx->need_xnvctrl == true) && (hwmon_ctx->hm_nvml)) // xnvctrl can't work alone, we need nvml, too
{
hwmon_ctx->hm_xnvctrl = (XNVCTRL_PTR *) hcmalloc (sizeof (XNVCTRL_PTR));

Loading…
Cancel
Save