From de6b1bcbf0956003afb654c5c77b6577dbe460ec Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 30 Sep 2017 17:11:51 +0200 Subject: [PATCH] Fix another Coverity error --- tasks/task_autodetect.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tasks/task_autodetect.c b/tasks/task_autodetect.c index 1dd7de8d9a..2152f287c7 100644 --- a/tasks/task_autodetect.c +++ b/tasks/task_autodetect.c @@ -401,14 +401,13 @@ bool input_autoconfigure_disconnect(unsigned i, const char *ident) { char msg[255]; retro_task_t *task = (retro_task_t*)calloc(1, sizeof(*task)); - autoconfig_disconnect_t *state = (autoconfig_disconnect_t*)malloc(sizeof(*state)); + autoconfig_disconnect_t *state = (autoconfig_disconnect_t*)calloc(1, sizeof(*state)); if (!state || !task) goto error; msg[0] = '\0'; - state->msg = NULL; state->idx = i; snprintf(msg, sizeof(msg), "%s #%u (%s).",