Skip to content

Commit d8f81cb

Browse files
authored
call free before calloc, just in case there was already memory allocated
1 parent a9b82a4 commit d8f81cb

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/reverb/dsp/Delay.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class Delay
5555
{
5656
size = next_power_of_2 (n);
5757
assert (size <= (1 << 20));
58+
free (data);
5859
data = (sample_t *) calloc (sizeof (sample_t), size);
5960
--size; /* used as mask for confining access */
6061
write = n;

0 commit comments

Comments
 (0)