mirror of
https://github.com/mpv-player/mpv
synced 2025-03-20 02:09:52 +00:00
ao_alsa: fix snd_config memory leak
During AO init, snd_pcm_open() is called, which calls snd_config_update() to allocate a global config node and stores it in the snd_config global variable. This is never freed on uninit. Fix this by freeing the global config node on uninit.
This commit is contained in:
parent
cb82ad73f2
commit
765a43a0ff
@ -623,7 +623,8 @@ static void uninit(struct ao *ao)
|
||||
CHECK_ALSA_ERROR("pcm close error");
|
||||
}
|
||||
|
||||
alsa_error: ;
|
||||
alsa_error:
|
||||
snd_config_update_free_global();
|
||||
}
|
||||
|
||||
#define INIT_DEVICE_ERR_GENERIC -1
|
||||
|
Loading…
Reference in New Issue
Block a user