src/io/source_avcodec.c: make sure s->path is set to null
authorPaul Brossier <piem@piem.org>
Sat, 17 Dec 2016 11:03:24 +0000 (12:03 +0100)
committerPaul Brossier <piem@piem.org>
Sat, 17 Dec 2016 11:03:24 +0000 (12:03 +0100)
src/io/source_avcodec.c

index 7d0a9b7..eae1cfc 100644 (file)
@@ -531,8 +531,11 @@ void del_aubio_source_avcodec(aubio_source_avcodec_t * s){
   if (s->avFrame != NULL) {
     av_frame_free( &(s->avFrame) );
   }
-  if (s->path) AUBIO_FREE(s->path);
   s->avFrame = NULL;
+  if (s->path) {
+    AUBIO_FREE(s->path);
+  }
+  s->path = NULL;
   AUBIO_FREE(s);
 }