ffprobe: Fix memory leak
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>
Fri, 21 Jun 2019 13:34:45 +0000 (14:34 +0100)
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>
Fri, 21 Jun 2019 14:40:58 +0000 (15:40 +0100)
This packet was not necessarily unreferenced.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
fftools/ffprobe.c

index 3becb63..5aaddb0 100644 (file)
@@ -2429,9 +2429,7 @@ static int read_interval_packets(WriterContext *w, InputFile *ifile,
         }
         av_packet_unref(&pkt);
     }
-    av_init_packet(&pkt);
-    pkt.data = NULL;
-    pkt.size = 0;
+    av_packet_unref(&pkt);
     //Flush remaining frames that are cached in the decoder
     for (i = 0; i < fmt_ctx->nb_streams; i++) {
         pkt.stream_index = i;