mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-03 13:51:02 +00:00
Fix another Coverity error
This commit is contained in:
parent
b46f2ba35f
commit
73d1539bb0
@ -477,7 +477,7 @@ bool input_autoconfigure_connect(
|
||||
{
|
||||
unsigned i;
|
||||
retro_task_t *task = (retro_task_t*)calloc(1, sizeof(*task));
|
||||
autoconfig_params_t *state = (autoconfig_params_t*)malloc(sizeof(autoconfig_params_t));
|
||||
autoconfig_params_t *state = (autoconfig_params_t*)calloc(1, sizeof(*state));
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *dir_autoconf = settings ? settings->paths.directory_autoconfig : NULL;
|
||||
bool autodetect_enable = settings ? settings->bools.input_autodetect_enable : false;
|
||||
@ -485,9 +485,6 @@ bool input_autoconfigure_connect(
|
||||
if (!task || !state || !autodetect_enable)
|
||||
goto error;
|
||||
|
||||
state->name = NULL;
|
||||
state->autoconfig_directory = NULL;
|
||||
|
||||
if (!string_is_empty(name))
|
||||
state->name = strdup(name);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user