From 8bdc288d6bf33893e41ba4b7cfd819a6e3dab49b Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Fri, 2 Nov 2012 14:33:28 +0100 Subject: [PATCH] fix leak: free s->mix.{decbuf,resampbuf} --- sndiod/dev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sndiod/dev.c b/sndiod/dev.c index 50d2779..3315d5f 100644 --- a/sndiod/dev.c +++ b/sndiod/dev.c @@ -653,6 +653,10 @@ dev_mix_cycle(struct dev *d) if (s->pstate == SLOT_STOP && s->mix.buf.used == 0) { s->pstate = SLOT_INIT; abuf_done(&s->mix.buf); + if (s->mix.decbuf) + xfree(s->mix.decbuf); + if (s->mix.resampbuf) + xfree(s->mix.resampbuf); s->ops->eof(s->arg); *ps = s->next; continue;