changeset 35620:6e78455a4b60

Fix a resource leak.
author upsuper
date Sun, 06 Jan 2013 13:26:16 +0000
parents 9ca9775defff
children 5bd6866e8566
files libaf/af_resample.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libaf/af_resample.c	Sun Jan 06 09:45:34 2013 +0000
+++ b/libaf/af_resample.c	Sun Jan 06 13:26:16 2013 +0000
@@ -244,6 +244,7 @@
       if(NULL == w || NULL == s->w ||
 	 -1 == af_filter_design_fir(s->up*L, w, &fc, LP|KAISER , 10.0)){
 	mp_msg(MSGT_AFILTER, MSGL_ERR, "[resample] Unable to design prototype filter.\n");
+	free(w);
 	return AF_ERROR;
       }
       // Copy data from prototype to polyphase filter