Skip to content

Commit 12aa952

Browse files
author
Robert McNamara
committed
Fix memory leak in GetUpcoming API.
Switch the temp recording list back to autodelete, and just push back new recordingInfo objects into the final list (which is also autodelete).
1 parent bae9371 commit 12aa952

File tree

1 file changed

+3
-3
lines changed
  • mythtv/programs/mythbackend/services

1 file changed

+3
-3
lines changed

mythtv/programs/mythbackend/services/dvr.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ DTC::ProgramList* Dvr::GetUpcoming( int nStartIndex,
211211
bool bShowAll )
212212
{
213213
RecordingList recordingList;
214-
RecordingList tmpList(false);
214+
RecordingList tmpList;
215215
bool hasConflicts;
216216
LoadFromScheduler(tmpList, hasConflicts);
217217

@@ -223,12 +223,12 @@ DTC::ProgramList* Dvr::GetUpcoming( int nStartIndex,
223223
((*it)->GetRecordingStartTime() >=
224224
QDateTime::currentDateTime()))
225225
{
226-
recordingList.push_back(*it);
226+
recordingList.push_back(new RecordingInfo(**it));
227227
}
228228
else if (bShowAll && ((*it)->GetRecordingStartTime() >=
229229
QDateTime::currentDateTime()))
230230
{
231-
recordingList.push_back(*it);
231+
recordingList.push_back(new RecordingInfo(**it));
232232
}
233233
}
234234

0 commit comments

Comments
 (0)