mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-11-10 00:25:43 +01:00
alsactl: small code reorder to avoid memory leaks
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
e3e85a851c
commit
b95dd7ef46
1 changed files with 1 additions and 1 deletions
|
@ -185,11 +185,11 @@ static int add_tlv_comments(snd_ctl_t *handle, snd_ctl_elem_id_t *id,
|
|||
char *s = tlv_to_str(tlv);
|
||||
if (s) {
|
||||
err = snd_config_string_add(comment, "tlv", s);
|
||||
free(s);
|
||||
if (err < 0) {
|
||||
error("snd_config_string_add: %s", snd_strerror(err));
|
||||
return err;
|
||||
}
|
||||
free(s);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue