mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-07 01:46:12 +00:00
Attempt to fix Coverity ID 158346
This commit is contained in:
parent
ec3a4e219b
commit
7e43d9c469
@ -361,6 +361,9 @@ bool input_autoconfigure_disconnect(unsigned i, const char *ident)
|
||||
retro_task_t *task = (retro_task_t*)calloc(1, sizeof(*task));
|
||||
autoconfig_disconnect_t *state = (autoconfig_disconnect_t*)calloc(1, sizeof(*state));
|
||||
|
||||
if (!state || !task)
|
||||
goto error;
|
||||
|
||||
msg[0] = '\0';
|
||||
|
||||
state->idx = i;
|
||||
@ -369,9 +372,6 @@ bool input_autoconfigure_disconnect(unsigned i, const char *ident)
|
||||
msg_hash_to_str(MSG_DEVICE_DISCONNECTED_FROM_PORT),
|
||||
i, ident);
|
||||
|
||||
if (!task || !state)
|
||||
goto error;
|
||||
|
||||
strlcpy(state->msg, msg, sizeof(state->msg));
|
||||
|
||||
task->state = state;
|
||||
|
Loading…
x
Reference in New Issue
Block a user