Ticket #7152: libs_libmythtv-memory-leaks-ticket-7152

File libs_libmythtv-memory-leaks-ticket-7152, 2.1 KB (added by Erik Hovland <erik@…>, 11 years ago)

Same patch as before but against trunk as of 2010-02-03

Line 
1Plug all memory leaks
2
3From: Erik Hovland <erik@hovland.org>
4
5
6---
7
8 mythtv/libs/libmythtv/NuppelVideoRecorder.cpp      |    2 ++
9 .../libs/libmythtv/channelscan/channelscan_sm.cpp  |    2 ++
10 mythtv/libs/libmythtv/openglvideo.cpp              |    1 +
11 3 files changed, 5 insertions(+), 0 deletions(-)
12
13
14diff --git a/mythtv/libs/libmythtv/NuppelVideoRecorder.cpp b/mythtv/libs/libmythtv/NuppelVideoRecorder.cpp
15index a7deca6..ec6d8fa 100644
16--- a/mythtv/libs/libmythtv/NuppelVideoRecorder.cpp
17+++ b/mythtv/libs/libmythtv/NuppelVideoRecorder.cpp
18@@ -2627,6 +2627,7 @@ void NuppelVideoRecorder::doVbiThread(void)
19         {
20             VERBOSE(VB_IMPORTANT, LOC_ERR +
21                     "Failed to query vbi capabilities (v4l1)");
22+            delete ntsc_cc;
23             return;
24         }
25         VERBOSE(VB_RECORD, LOC + "vbi_format  rate: "<<vfmt.sampling_rate
26@@ -2648,6 +2649,7 @@ void NuppelVideoRecorder::doVbiThread(void)
27         {
28             VERBOSE(VB_IMPORTANT, LOC_ERR +
29                     "VBI format has too many samples per frame");
30+            delete ntsc_cc;
31             return;
32         }
33     }
34diff --git a/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp b/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp
35index 593e2d1..2b8c6c1 100644
36--- a/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp
37+++ b/mythtv/libs/libmythtv/channelscan/channelscan_sm.cpp
38@@ -924,6 +924,8 @@ static void update_info(ChannelInsertInfo &info,
39     info.is_data_service =
40         (desc && !desc->IsDTV() && !desc->IsDigitalAudio());
41     info.is_audio_service = (desc && desc->IsDigitalAudio());
42+    if (desc)
43+        delete desc;
44 
45     info.sdt_tsid   = sdt->TSID();
46     info.orig_netid = sdt->OriginalNetworkID();
47diff --git a/mythtv/libs/libmythtv/openglvideo.cpp b/mythtv/libs/libmythtv/openglvideo.cpp
48index b4c65ff..3b00519 100644
49--- a/mythtv/libs/libmythtv/openglvideo.cpp
50+++ b/mythtv/libs/libmythtv/openglvideo.cpp
51@@ -507,6 +507,7 @@ bool OpenGLVideo::AddFilter(OpenGLFilterType filter)
52 
53     RemoveFilter(filter);
54     filters.erase(filter);
55+    delete temp;
56 
57     return false;
58 }