libavformat/swfenc.c:490: error: Use After Free
  call to `av_fifo_free()` eventually accesses memory that was invalidated by call to `free()` on line 490 indirectly during the call to `av_fifo_free()`.

libavformat/swfenc.c:477:1: invalidation part of the trace starts here
475. }
476. 
477. static int swf_write_trailer(AVFormatContext *s)
     ^
478. {
479.     SWFContext *swf = s->priv_data;

libavformat/swfenc.c:477:1: parameter `s` of swf_write_trailer
  475. }
  476. 
  477. static int swf_write_trailer(AVFormatContext *s)
       ^
  478. {
  479.     SWFContext *swf = s->priv_data;

libavformat/swfenc.c:479:5: assigned
  477. static int swf_write_trailer(AVFormatContext *s)
  478. {
  479.     SWFContext *swf = s->priv_data;
           ^
  480.     AVIOContext *pb = s->pb;
  481.     AVCodecContext *enc, *video_enc;

libavformat/swfenc.c:490:13: when calling `av_fifo_free` here
  488.             video_enc = enc;
  489.         else
  490.             av_fifo_free(swf->audio_fifo);
                   ^
  491.     }
  492. 

libavutil/fifo.c:38:1: parameter `f` of av_fifo_free
    36. }
    37. 
    38. void av_fifo_free(AVFifoBuffer *f)
        ^
    39. {
    40.     if (f) {

libavutil/fifo.c:42:9: when calling `av_free` here
    40.     if (f) {
    41.         av_free(f->buffer);
    42.         av_free(f);
                ^
    43.     }
    44. }

libavutil/mem.c:165:1: parameter `ptr` of av_free
      163. }
      164. 
      165. void av_free(void *ptr)
           ^
      166. {
      167. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:173:5: was invalidated by call to `free()`
      171.     _aligned_free(ptr);
      172. #else
      173.     free(ptr);
               ^
      174. #endif
      175. }

libavformat/swfenc.c:477:1: use-after-lifetime part of the trace starts here
475. }
476. 
477. static int swf_write_trailer(AVFormatContext *s)
     ^
478. {
479.     SWFContext *swf = s->priv_data;

libavformat/swfenc.c:477:1: parameter `s` of swf_write_trailer
  475. }
  476. 
  477. static int swf_write_trailer(AVFormatContext *s)
       ^
  478. {
  479.     SWFContext *swf = s->priv_data;

libavformat/swfenc.c:479:5: assigned
  477. static int swf_write_trailer(AVFormatContext *s)
  478. {
  479.     SWFContext *swf = s->priv_data;
           ^
  480.     AVIOContext *pb = s->pb;
  481.     AVCodecContext *enc, *video_enc;

libavformat/swfenc.c:490:13: when calling `av_fifo_free` here
  488.             video_enc = enc;
  489.         else
  490.             av_fifo_free(swf->audio_fifo);
                   ^
  491.     }
  492. 

libavutil/fifo.c:38:1: parameter `f` of av_fifo_free
    36. }
    37. 
    38. void av_fifo_free(AVFifoBuffer *f)
        ^
    39. {
    40.     if (f) {

libavutil/fifo.c:42:9: when calling `av_free` here
    40.     if (f) {
    41.         av_free(f->buffer);
    42.         av_free(f);
                ^
    43.     }
    44. }

libavutil/mem.c:165:1: parameter `ptr` of av_free
      163. }
      164. 
      165. void av_free(void *ptr)
           ^
      166. {
      167. #if CONFIG_MEMALIGN_HACK

libavutil/mem.c:173:5: invalid access occurs here
      171.     _aligned_free(ptr);
      172. #else
      173.     free(ptr);
               ^
      174. #endif
      175. }
