ref: 11c13fc057e45b6a6213de83adccf233fc96ace1
parent: 104dc19dc3fb0e6fd367e9820c06608f1d590eac
author: Eric Wong <normalperson@yhbt.net>
date: Sun Jun 10 02:53:26 EDT 2012
ladspa: call cleanup function if given Some plugins have cleanup functions to deallocate memory after instantiation. This must be called after deactivate.
--- a/src/ladspa.c
+++ b/src/ladspa.c
@@ -284,6 +284,9 @@
/* If needed, deactivate the plugin */
if (l_st->desc->deactivate)
l_st->desc->deactivate(l_st->handle);
+ /* If needed, cleanup memory used by the plugin */
+ if (l_st->desc->cleanup)
+ l_st->desc->cleanup(l_st->handle);
return SOX_SUCCESS;
}