topology: next round of coverity fixes

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
Jaroslav Kysela 2019-05-27 14:05:12 +02:00
parent 022c790aab
commit c6e7fd8b1e
2 changed files with 7 additions and 5 deletions

View file

@ -253,8 +253,10 @@ static int tplg_load_config(const char *file, snd_config_t **cfg)
}
ret = snd_input_close(in);
if (ret < 0)
if (ret < 0) {
in = NULL;
goto err_load;
}
*cfg = top;
return 0;
@ -262,7 +264,8 @@ static int tplg_load_config(const char *file, snd_config_t **cfg)
err_load:
snd_config_delete(top);
err:
snd_input_close(in);
if (in)
snd_input_close(in);
return ret;
}