From 5539fef9cea062c29e49a607fe673ceed4c54ba6 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Mon, 4 Oct 2010 22:21:25 +0200 Subject: fixed few memleaks in ao spu --- plugins/ao/eng_psf/eng_spu.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/ao/eng_psf/eng_spu.c b/plugins/ao/eng_psf/eng_spu.c index dbda70ac..966fe870 100644 --- a/plugins/ao/eng_psf/eng_spu.c +++ b/plugins/ao/eng_psf/eng_spu.c @@ -263,7 +263,14 @@ int32 spu_gen(void *handle, int16 *buffer, uint32 samples) int32 spu_stop(void *handle) { - free (handle); + spu_synth_t *s = handle; + if (s) { + if (s->mips_cpu) { + SPUclose(s->mips_cpu); + free (s->mips_cpu); + } + free (s); + } return AO_SUCCESS; } -- cgit v1.2.3