[vlc-devel] Fixed TCP handle leak on failed attempt to open network stream
agent_007 at luukku.com
Wed Jan 20 18:00:17 CET 2010
tom245292 at hushmail.me kirjoitti 20.01.2010 kello 17:14:
> Thanks. You were right about the problem being in
> src/misc/objects.c . I believe that the leak was actually caused by
> the position of the WIN32 specific winsock code (pipe() + def
> statements) that was located BELOW vlc_object_destroy(). These
> defined the close() statement as clocksocket() for WIN32. However,
> because they are defined AFTER vlc_object_destroy(), the close()
> statements have a different meaning inside vlc_object_destroy()
> itself. Consequently closesocket() doesn't get called and the two
> pipe sockets get left open.
> To fix this I've moved the definition for vlc_object_destroy to
> BELOW the WIN32 specific winsock code. This now allows
> vlc_object_destroy() to call closesocket() and thus cleans up the
> I have performed a preliminary build to confirm that this fixes the
> leak on Windows XP. I will perform more vigorous testing to ensure
> that there are no side effects later on.
> As I'm completly new to VLC development, could somebody please
> check that I've got this bugfix right ?
Could you give us a patch file? That way you get yourself some credit.
> Thanks again,
> On Wed, 20 Jan 2010 12:59:44 +0000 Remi Denis-Courmont
> <remi at remlab.net> wrote:
> >----- Message d'origine -----
> >> I am searching through VLC's source code to try and find where
> >> these connections are left open. Any help or advice would be
> >> greatly appreciated.
> >For HTTP, modules/access/http.c, for RTSP
> >moduled/demux/live555.cpp and the underlying live555 library.
> >> Example command line: "c:\program files\VideoLan\vlc\vlc.exe
> >> rtsp:\\badURL".
> >If that fails, even with an invalid domain name, it sounds more
> >like a problem in the "waitpipe" in src/misc/objects.c.
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
Luukku Plus -paketilla pääset eroon tila- ja turvallisuusongelmista.
Hanki Luukku Plus ja helpotat elämääsi. http://www.mtv3.fi/luukku
More information about the vlc-devel