[FFmpeg-devel] [PATCH] fix tests/seek_test memleaks
Vitor Sessak
vitor1001
Sun Feb 28 17:34:48 CET 2010
Reimar D?ffinger wrote:
> On Sat, Feb 27, 2010 at 03:55:42PM +0100, Vitor Sessak wrote:
>> Reimar D?ffinger wrote:
>>> Hello,
>>> seems there's a incorrect av_dup_packet in utils.c?
>>> At least I am unable to see why it is there, and I sure can't see a corresponding
>>> free...
>>> Also is the documentation on av_open_input_file clear enough that you shouldn't
>>> alloc the context first?
>>> Index: libavformat/utils.c
>>> ===================================================================
>>> --- libavformat/utils.c (revision 22083)
>>> +++ libavformat/utils.c (working copy)
>>> @@ -2169,10 +2169,6 @@
>>> }
>>> pkt= add_to_pktbuf(&ic->packet_buffer, &pkt1, &ic->packet_buffer_end);
>>> - if(av_dup_packet(pkt) < 0) {
>>> - av_free(duration_error);
>>> - return AVERROR(ENOMEM);
>>> - }
>> This hunk seems to break "make test":
>
> Yes, I completely misunderstood the code.
> I applied correct fixes, seek_test should no longer leak memory.
Great, thanks!
Now "make test" pass with no valgrind errors after NUT and FFM patches
[1,2] applied using
./configure --target-exec='valgrind --leak-check=full
--suppressions=sup.txt --error-exitcode=1 --malloc-fill=0xff'
With the suppressions file attached.
-Vitor
[1] https://roundup.ffmpeg.org/issue1759
[2] https://roundup.ffmpeg.org/issue1782
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sup.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100228/18cc809b/attachment.txt>
More information about the ffmpeg-devel
mailing list