Do not abort in snd_xxx_close() functions

Remove several memory leaks by not aborting prematurely from a
snd_xxx_close() function when some operation fails.
This can happen when a USB device was unplugged.
This commit is contained in:
Clemens Ladisch 2006-02-27 09:54:57 +00:00
parent f9c7321670
commit 45850439b3
11 changed files with 33 additions and 33 deletions

View file

@ -64,10 +64,7 @@ static int snd_pcm_plug_close(snd_pcm_t *pcm)
int err, result = 0;
if (plug->ttable)
free(plug->ttable);
if (plug->gen.slave != plug->req_slave) {
SNDERR("plug slaves mismatch");
return -EINVAL;
}
assert(plug->gen.slave == plug->req_slave);
if (plug->gen.close_slave) {
snd_pcm_unlink_hw_ptr(pcm, plug->req_slave);
snd_pcm_unlink_appl_ptr(pcm, plug->req_slave);