summaryrefslogtreecommitdiff
path: root/plugins/ao
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-10-04 22:29:50 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-10-04 22:29:50 +0200
commit43beeb7291d4c3290bc87f6aa55941dbfcd2d2bd (patch)
treeef0862fe2af9136d77bec81f0112cbbe1566811d /plugins/ao
parent5539fef9cea062c29e49a607fe673ceed4c54ba6 (diff)
fixed memleaks in ao ssf
Diffstat (limited to 'plugins/ao')
-rw-r--r--plugins/ao/eng_ssf/eng_ssf.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/ao/eng_ssf/eng_ssf.c b/plugins/ao/eng_ssf/eng_ssf.c
index 18ba0e42..9b1b5714 100644
--- a/plugins/ao/eng_ssf/eng_ssf.c
+++ b/plugins/ao/eng_ssf/eng_ssf.c
@@ -295,7 +295,16 @@ int32 ssf_gen(void *handle, int16 *buffer, uint32 samples)
int32 ssf_stop(void *handle)
{
ssf_synth_t *s = handle;
- sat_hw_free (s->cpu);
+ if (s) {
+ if (s->c) {
+ free (s->c);
+ }
+ if (s->cpu) {
+ sat_hw_free (s->cpu);
+ free (s->cpu);
+ }
+ free (s);
+ }
return AO_SUCCESS;
}