mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-04 13:30:08 -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);
|
err = snd_config_get_bool_ascii(tmp);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
SNDERR("field %s is not a boolean", id);
|
SNDERR("field %s is not a boolean", id);
|
||||||
|
free(tmp);
|
||||||
goto _err;
|
goto _err;
|
||||||
}
|
}
|
||||||
lock = err;
|
lock = err;
|
||||||
|
free(tmp);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (strcmp(id, "preserve") == 0) {
|
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);
|
err = snd_config_get_bool_ascii(tmp);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
SNDERR("field %s is not a boolean", id);
|
SNDERR("field %s is not a boolean", id);
|
||||||
|
free(tmp);
|
||||||
goto _err;
|
goto _err;
|
||||||
}
|
}
|
||||||
preserve = err;
|
preserve = err;
|
||||||
|
free(tmp);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (strcmp(id, "value") == 0) {
|
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);
|
err = snd_config_get_bool_ascii(tmp);
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
SNDERR("field %s is not a boolean", id);
|
SNDERR("field %s is not a boolean", id);
|
||||||
|
free(tmp);
|
||||||
goto _err;
|
goto _err;
|
||||||
}
|
}
|
||||||
optional = err;
|
optional = err;
|
||||||
|
free(tmp);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
SNDERR("Unknown field %s", id);
|
SNDERR("Unknown field %s", id);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue