1
mirror of https://github.com/hashcat/hashcat synced 2024-11-24 14:27:14 +01:00

Add missing check for opencl_ctx_init()

This commit is contained in:
Gabriele Gristina 2016-09-18 18:30:32 +02:00
parent fd70fde1df
commit a94102f37a
2 changed files with 11 additions and 4 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
*.bin
*.app
hashcat
*.potfile
*.restore
*.dictstat
*.pot

View File

@ -1723,7 +1723,11 @@ int main (int argc, char **argv)
opencl_device_types = strdup("1,2,3");
}
opencl_ctx_init (opencl_ctx, opencl_platforms, opencl_devices, opencl_device_types, opencl_vector_width, opencl_vector_width_chgd, nvidia_spin_damp, nvidia_spin_damp_chgd, workload_profile, kernel_accel, kernel_accel_chgd, kernel_loops, kernel_loops_chgd, keyspace, stdout_flag);
if (opencl_ctx_init (opencl_ctx, opencl_platforms, opencl_devices, opencl_device_types, opencl_vector_width, opencl_vector_width_chgd, nvidia_spin_damp, nvidia_spin_damp_chgd, workload_profile, kernel_accel, kernel_accel_chgd, kernel_loops, kernel_loops_chgd, keyspace, stdout_flag) != 0)
{
log_error ("ERROR: opencl_ctx_init() failed.");
return -1;
}
/**
* benchmark
@ -2412,9 +2416,11 @@ int main (int argc, char **argv)
}
}
const int rc_devices_init = opencl_ctx_devices_init (opencl_ctx, hashconfig, tuning_db, attack_mode, quiet, force, benchmark, opencl_info, machine_readable, algorithm_pos);
if (rc_devices_init == -1) return -1;
if (opencl_ctx_devices_init (opencl_ctx, hashconfig, tuning_db, attack_mode, quiet, force, benchmark, opencl_info, machine_readable, algorithm_pos) != 0)
{
log_error ("ERROR: opencl_ctx_devices_init() failed.");
return -1;
}
/**
* HM devices: init