[mythtv-commits] Ticket #11341: RemoteFile::Open() can leak MythSockets
MythTV
noreply at mythtv.org
Mon Jun 24 19:01:51 UTC 2013
#11341: RemoteFile::Open() can leak MythSockets
----------------------------------+-----------------------------
Reporter: paulh <mythtv@…> | Owner: cpinkham
Type: Bug Report - General | Status: closed
Priority: minor | Milestone: unknown
Component: MythTV - General | Version: Master Head
Severity: medium | Resolution: fixed
Keywords: | Ticket locked: 0
----------------------------------+-----------------------------
Changes (by Chris Pinkham <cpinkham@…>):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"4c9dc6d7eebe6853285efbe76a2f81ad80ebbc3c/mythtv"]:
{{{
#!CommitTicketReference repository="mythtv"
revision="4c9dc6d7eebe6853285efbe76a2f81ad80ebbc3c"
RemoteFile leak fix and simplification
RemoteFile::Open() would leak file descriptors if Open() was explicitly
called again after passing a url to the contructor which itself called
Open().
This commit does several things:
- Moves Open() private since RemoteFile users shouldn't need to Open()
- Moves Close() private since there's no need to Close() if you can't
Open().
Close() is already called in the destructor.
- Convert the remaining uses of Open() to isOpen() since the connection is
already opened in all these cases.
- Remove a few Close() uses since they were were redundant since we
already
Close() in the destructor.
- Removes unused SetURL() functionality. If you can't Open() or Close(),
then you need to pass the URL in to the constructor so there's no need.
- Fixes the actual leak in Open() by checking to see if the sockets are
already open. Just in case.... Closes #11341.
NOTE: This does modify the binary ABI version number due to the
remotefile.h
changes, so make clean, etc..
}}}
--
Ticket URL: <http://code.mythtv.org/trac/ticket/11341#comment:3>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list