shithub: aubio

Download patch

ref: dc7362fd01ba34189e434f396729ff0c12c36e50
parent: c1c3a9956a7bef38be100dcba0135f02a6b56a41
author: Paul Brossier <piem@piem.org>
date: Mon Dec 31 12:25:08 EST 2018

[source_avcodec] prevent leak when closing swresample context

--- a/src/io/source_avcodec.c
+++ b/src/io/source_avcodec.c
@@ -619,10 +619,11 @@
   if (s->avr != NULL) {
 #ifdef HAVE_AVRESAMPLE
     avresample_close( s->avr );
+    av_free ( s->avr );
 #elif defined(HAVE_SWRESAMPLE)
     swr_close ( s->avr );
+    swr_free ( &s->avr );
 #endif
-    av_free ( s->avr );
   }
   s->avr = NULL;
   if (s->avCodecCtx != NULL) {