diff options
author | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2006-06-21 11:04:51 +0000 |
---|---|---|
committer | IOhannes m zmölnig <zmoelnig@users.sourceforge.net> | 2006-06-21 11:04:51 +0000 |
commit | 901bc262d93286aa380e51d13fa4bc5bce564897 (patch) | |
tree | 9b7cb2fe178854b4e12ba985b5e7d6d7b5e606aa /src/blockshuffle~.c | |
parent | c71afaf1f8fa3f333dc75b21ee413a1c90211d3f (diff) |
proper freeing of allocated buffers
svn path=/trunk/externals/zexy/; revision=5280
Diffstat (limited to 'src/blockshuffle~.c')
-rw-r--r-- | src/blockshuffle~.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/blockshuffle~.c b/src/blockshuffle~.c index 772c792..853ec64 100644 --- a/src/blockshuffle~.c +++ b/src/blockshuffle~.c @@ -29,8 +29,7 @@ static t_class *blockshuffle_class; typedef struct _blockshuffle -{ - t_object x_obj; +{ t_object x_obj; t_sample*blockbuf; t_int* indices; @@ -115,9 +114,9 @@ static void blockshuffle_helper(void) post("outlet : signal~"); } static void blockshuffle_free(t_blockshuffle *x){ - if(x->indices)freebytes(x->indices, x->size); - if(x->blockbuf)freebytes(x->blockbuf, x->size); - if(x->shuffle)freebytes(x->shuffle, x->shufflesize); + if(x->indices) freebytes(x->indices, sizeof(t_int) *x->size); + if(x->blockbuf)freebytes(x->blockbuf, sizeof(t_sample)*x->size); + if(x->shuffle) freebytes(x->shuffle, sizeof(t_float) *x->shufflesize); } static void *blockshuffle_new(void) |