[FFmpeg-devel] [PATCH v2] ffprobe: Fix memory leak
Nicolas George
george at nsup.org
Fri Jun 21 17:26:36 EEST 2019
Derek Buitenhuis (12019-06-21):
> This packet was not necessarily unreferenced.
>
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> ---
> fftools/ffprobe.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
> index 3becb6330e..dac70ba5a1 100644
> --- a/fftools/ffprobe.c
> +++ b/fftools/ffprobe.c
> @@ -2429,6 +2429,8 @@ static int read_interval_packets(WriterContext *w, InputFile *ifile,
> }
> av_packet_unref(&pkt);
> }
> + av_packet_unref(&pkt);
> +
How can the packet not be unreferenced when the very previous
instruction is av_packet_unref()? All the code paths I see either pass
through the existing av_packet_unref() before reaching the new one or
arrive with a blank packet. Am I missing something?
> av_init_packet(&pkt);
> pkt.data = NULL;
> pkt.size = 0;
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190621/028b7253/attachment.sig>
More information about the ffmpeg-devel
mailing list