mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
Fix memory leaks
Fixed small memory leaks in the parser.
This commit is contained in:
parent
9e86ea6902
commit
0757f70b1b
1 changed files with 6 additions and 0 deletions
|
|
@ -461,9 +461,11 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da
|
|||
err = snd_config_get_bool_ascii(tmp);
|
||||
if (err < 0) {
|
||||
SNDERR("field %s is not a boolean", id);
|
||||
free(tmp);
|
||||
goto _err;
|
||||
}
|
||||
lock = err;
|
||||
free(tmp);
|
||||
continue;
|
||||
}
|
||||
if (strcmp(id, "preserve") == 0) {
|
||||
|
|
@ -474,9 +476,11 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da
|
|||
err = snd_config_get_bool_ascii(tmp);
|
||||
if (err < 0) {
|
||||
SNDERR("field %s is not a boolean", id);
|
||||
free(tmp);
|
||||
goto _err;
|
||||
}
|
||||
preserve = err;
|
||||
free(tmp);
|
||||
continue;
|
||||
}
|
||||
if (strcmp(id, "value") == 0) {
|
||||
|
|
@ -495,9 +499,11 @@ static int add_elem(snd_sctl_t *h, snd_config_t *_conf, snd_config_t *private_da
|
|||
err = snd_config_get_bool_ascii(tmp);
|
||||
if (err < 0) {
|
||||
SNDERR("field %s is not a boolean", id);
|
||||
free(tmp);
|
||||
goto _err;
|
||||
}
|
||||
optional = err;
|
||||
free(tmp);
|
||||
continue;
|
||||
}
|
||||
SNDERR("Unknown field %s", id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue