diff libaf/af_resample.c @ 35620:6e78455a4b60

Fix a resource leak.
author upsuper
date Sun, 06 Jan 2013 13:26:16 +0000
parents a93891202051
children 2b9bc3c2933d
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