Skip to content

Commit

Permalink
Merge pull request #12 from DanWin/master
Browse files Browse the repository at this point in the history
Fix memory leaks
  • Loading branch information
swh committed Dec 30, 2014
2 parents 15d2bdb + f2f7b8d commit 58e05da
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dj_eq_1901.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ filters = calloc(BANDS, sizeof(biquad));
*(plugin_data->latency) = 3; //XXX is this right?
]]></callback>

<callback event="cleanup"><![CDATA[
free(plugin_data->filters);
]]></callback>

<port label="lo" dir="input" type="control" hint="default_0">
<name>Lo gain (dB)</name>
<p>Controls the gain of the low (100Hz) peak/dip band</p>
Expand Down Expand Up @@ -140,6 +144,10 @@ filters = calloc(BANDS * 2, sizeof(biquad));
*(plugin_data->latency) = 3; //XXX is this right?
]]></callback>

<callback event="cleanup"><![CDATA[
free(plugin_data->filters);
]]></callback>

<port label="lo" dir="input" type="control" hint="default_0">
<name>Lo gain (dB)</name>
<p>Controls the gain of the low (100Hz) peak/dip band</p>
Expand Down
1 change: 1 addition & 0 deletions fast_lookahead_limiter_1913.xml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ over the limit, and tries to get the minimum ammount of distortion.</p>

<callback event="cleanup"><![CDATA[
free(plugin_data->buffer);
free(plugin_data->chunks);
]]></callback>

<port label="ingain" dir="input" type="control" hint="default_0">
Expand Down
5 changes: 5 additions & 0 deletions imp_1199.xml
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@
local_free(plugin_data->op);
local_free(plugin_data->overlap);
local_free(plugin_data->opc);
unsigned int i;
for (i=0; i<IMPULSES; i++) {
local_free(plugin_data->impulse_freq[i]);
}
local_free(plugin_data->impulse_freq);
]]></callback>

<callback event="run"><![CDATA[
Expand Down
1 change: 1 addition & 0 deletions vynil_1905.xml
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
free(plugin_data->buffer_m);
free(plugin_data->buffer_s);
free(plugin_data->click_buffer);
free(plugin_data->highp);
free(plugin_data->lowp_m);
free(plugin_data->lowp_s);
free(plugin_data->noise_filt);
Expand Down

0 comments on commit 58e05da

Please sign in to comment.