diff options
author | cg <cg@FreeBSD.org> | 2001-03-16 20:58:44 +0000 |
---|---|---|
committer | cg <cg@FreeBSD.org> | 2001-03-16 20:58:44 +0000 |
commit | fe5c8c72aa2edfaff227b360cd8360a1b14ce1a0 (patch) | |
tree | 7db49071404d2c728c7ad09876c995fbad779710 /sys/dev/sound/pcm/fake.c | |
parent | fa534e660d6323afb758326f29b9baec791d2ff4 (diff) | |
download | FreeBSD-src-fe5c8c72aa2edfaff227b360cd8360a1b14ce1a0.zip FreeBSD-src-fe5c8c72aa2edfaff227b360cd8360a1b14ce1a0.tar.gz |
don't leak memory allocated for feeders at module unload
kill the fake channel when unregistering
Diffstat (limited to 'sys/dev/sound/pcm/fake.c')
-rw-r--r-- | sys/dev/sound/pcm/fake.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/dev/sound/pcm/fake.c b/sys/dev/sound/pcm/fake.c index 28ae84a..e73fb6d 100644 --- a/sys/dev/sound/pcm/fake.c +++ b/sys/dev/sound/pcm/fake.c @@ -55,6 +55,12 @@ fkchan_init(kobj_t obj, void *devinfo, snd_dbuf *b, pcm_channel *c, int dir) } static int +fkchan_free(kobj_t obj, void *data) +{ + return 0; +} + +static int fkchan_setformat(kobj_t obj, void *data, u_int32_t format) { return 0; @@ -92,6 +98,7 @@ fkchan_getcaps(kobj_t obj, void *data) static kobj_method_t fkchan_methods[] = { KOBJMETHOD(channel_init, fkchan_init), + KOBJMETHOD(channel_free, fkchan_free), KOBJMETHOD(channel_setformat, fkchan_setformat), KOBJMETHOD(channel_setspeed, fkchan_setspeed), KOBJMETHOD(channel_setblocksize, fkchan_setblocksize), |