Skip to content

Commit

Permalink
Fix memory leak in FirewireChannel.
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartm committed May 24, 2012
1 parent 271a9bf commit b3b3f78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mythtv/libs/libmythtv/firewirechannel.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ FirewireChannel::FirewireChannel(TVRec *parent, const QString &_videodevice,
#endif // USING_OSX_FIREWIRE #endif // USING_OSX_FIREWIRE
} }


FirewireChannel::~FirewireChannel()
{
Close();
delete device;
}

bool FirewireChannel::Open(void) bool FirewireChannel::Open(void)
{ {
LOG(VB_CHANNEL, LOG_INFO, LOC + "Open()"); LOG(VB_CHANNEL, LOG_INFO, LOC + "Open()");
Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmythtv/firewirechannel.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class FirewireChannel : public DTVChannel
public: public:
FirewireChannel(TVRec *parent, const QString &videodevice, FirewireChannel(TVRec *parent, const QString &videodevice,
const FireWireDBOptions &firewire_opts); const FireWireDBOptions &firewire_opts);
virtual ~FirewireChannel();


// Commands // Commands
virtual bool Open(void); virtual bool Open(void);
Expand Down

0 comments on commit b3b3f78

Please sign in to comment.