summaryrefslogtreecommitdiffstats
path: root/libaf/af_resample.c
diff options
context:
space:
mode:
Diffstat (limited to 'libaf/af_resample.c')
-rw-r--r--libaf/af_resample.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libaf/af_resample.c b/libaf/af_resample.c
index 5dd0e70329..6809c48125 100644
--- a/libaf/af_resample.c
+++ b/libaf/af_resample.c
@@ -236,8 +236,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
fc = 1/(float)(max(s->up,s->dn));
// Allocate space for polyphase filter bank and prototype filter
w = malloc(sizeof(float) * s->up *L);
- if(NULL != s->w)
- free(s->w);
+ free(s->w);
s->w = malloc(L*s->up*af->data->bps);
// Design prototype filter type using Kaiser window with beta = 10