fix alsa memory leak

git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@360 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
Lennart Poettering 2005-09-16 00:11:48 +00:00
parent 9177ef4ce2
commit 656cf87993
2 changed files with 2 additions and 0 deletions

View file

@ -204,6 +204,7 @@ int pa__init(struct pa_core *c, struct pa_module*m) {
m->userdata = u;
u->module = m;
snd_config_update_free_global();
if (snd_pcm_open(&u->pcm_handle, dev = pa_modargs_get_value(ma, "device", DEFAULT_DEVICE), SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK) < 0) {
pa_log(__FILE__": Error opening PCM device %s\n", dev);
goto fail;

View file

@ -195,6 +195,7 @@ int pa__init(struct pa_core *c, struct pa_module*m) {
m->userdata = u;
u->module = m;
snd_config_update_free_global();
if (snd_pcm_open(&u->pcm_handle, dev = pa_modargs_get_value(ma, "device", DEFAULT_DEVICE), SND_PCM_STREAM_CAPTURE, SND_PCM_NONBLOCK) < 0) {
pa_log(__FILE__": Error opening PCM device %s\n", dev);
goto fail;