shithub: sox

Download patch

ref: fbc1d1ef1af64995a4d2549d8a99837b1bc55c68
parent: 8b840a1da8dbc686a315eac274e8eee747867a5a
author: rrt <rrt>
date: Wed Dec 27 11:17:31 EST 2006

Add delete method to free memory allocated in getopts method

--- a/src/mcompand.c
+++ b/src/mcompand.c
@@ -667,8 +667,16 @@
       free(l->filter.xy_high);
     }
   }
+
+  return ST_SUCCESS;
+}
+
+static int st_mcompand_delete(eff_t effp)
+{
+  compand_t c = (compand_t) effp->priv;
+
   free(c->bands);
-  c->bands = 0;
+  c->bands = NULL;
 
   return ST_SUCCESS;
 }
@@ -688,7 +696,7 @@
   st_mcompand_flow,
   st_mcompand_drain,
   st_mcompand_stop,
-  st_effect_nothing
+  st_mcompand_delete
 };
 
 const st_effect_t *st_mcompand_effect_fn(void)