mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 17:06:31 +01:00
alsactl: fix possible memory leak for dump-cfg
Also remove extra snd_config_update_free_global() call for dump-state. There's a global call in the main() function. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
c3f2344b72
commit
7f5622c106
1 changed files with 3 additions and 2 deletions
|
@ -179,7 +179,6 @@ static int dump_state(const char *file)
|
|||
return err;
|
||||
err = dump_config_tree(top);
|
||||
snd_config_delete(top);
|
||||
snd_config_update_free_global();
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -192,7 +191,9 @@ static int dump_configuration(void)
|
|||
if (err < 0)
|
||||
return err;
|
||||
/* expand cards.* tree */
|
||||
snd_config_search_definition(top, "cards", "dummy", &cfg2);
|
||||
err = snd_config_search_definition(top, "cards", "_dummy_", &cfg2);
|
||||
if (err >= 0)
|
||||
snd_config_delete(cfg2);
|
||||
err = dump_config_tree(top);
|
||||
snd_config_unref(top);
|
||||
return err;
|
||||
|
|
Loading…
Reference in a new issue