Permalink
Browse files

Fix memory leak in FirewireChannel.

  • Loading branch information...
1 parent 271a9bf commit b3b3f78a16e8a495bff6be0e4b598b9437fb80c4 @stuartm stuartm committed May 24, 2012
Showing with 7 additions and 0 deletions.
  1. +6 −0 mythtv/libs/libmythtv/firewirechannel.cpp
  2. +1 −0 mythtv/libs/libmythtv/firewirechannel.h
@@ -38,6 +38,12 @@ FirewireChannel::FirewireChannel(TVRec *parent, const QString &_videodevice,
#endif // USING_OSX_FIREWIRE
}
+FirewireChannel::~FirewireChannel()
+{
+ Close();
+ delete device;
+}
+
bool FirewireChannel::Open(void)
{
LOG(VB_CHANNEL, LOG_INFO, LOC + "Open()");
@@ -19,6 +19,7 @@ class FirewireChannel : public DTVChannel
public:
FirewireChannel(TVRec *parent, const QString &videodevice,
const FireWireDBOptions &firewire_opts);
+ virtual ~FirewireChannel();
// Commands
virtual bool Open(void);

0 comments on commit b3b3f78

Please sign in to comment.