[FFmpeg-devel] [PATCH] tcp.c/udp.c memleak?

Ronald S. Bultje rsbultje
Thu Aug 21 05:09:27 CEST 2008


Hi Michael,

On Wed, Aug 20, 2008 at 10:42 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Wed, Aug 20, 2008 at 02:03:12PM -0400, Ronald S. Bultje wrote:
>> Hi,
>>
>> tcpmemleak.patch: I think the malloc should go after the init &
>> paramchecks otherwise the return in ff_network_init() could be a
>> memleak. In tcp.c, I move the malloc down,
>
> i think it should be moved over all goto fail* which would allow
> the fail case to be simplified

Hm, ok, like $attached?

I also attached a second which removes all useless comments in this
function. These comments are like "// url_split where the line that
the comments refers to in fact, yes really, you wouldn't believe it,
calls url_split. Also many other clueful comments in that func, I
killed them all. I also butchered a line which removes the
authentication from the returned hostname, because that same line is
already in url_split (even if auth is NULL) and rearranges some other
lines to make the function even smaller. (Maybe you want a new thread
for this or have it split for all the re-arrange thingies and
everything?)

Ronald
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tcpmemleak.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080820/c86519cd/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tcpremoveuselesscomments.patch
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080820/c86519cd/attachment.txt>



More information about the ffmpeg-devel mailing list