Skip to content

Commit b3b3f78

Browse files
committed
Fix memory leak in FirewireChannel.
1 parent 271a9bf commit b3b3f78

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

mythtv/libs/libmythtv/firewirechannel.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ FirewireChannel::FirewireChannel(TVRec *parent, const QString &_videodevice,
3838
#endif // USING_OSX_FIREWIRE
3939
}
4040

41+
FirewireChannel::~FirewireChannel()
42+
{
43+
Close();
44+
delete device;
45+
}
46+
4147
bool FirewireChannel::Open(void)
4248
{
4349
LOG(VB_CHANNEL, LOG_INFO, LOC + "Open()");

mythtv/libs/libmythtv/firewirechannel.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class FirewireChannel : public DTVChannel
1919
public:
2020
FirewireChannel(TVRec *parent, const QString &videodevice,
2121
const FireWireDBOptions &firewire_opts);
22+
virtual ~FirewireChannel();
2223

2324
// Commands
2425
virtual bool Open(void);

0 commit comments

Comments
 (0)