Fixed a memory leak in closing the video file during replay

This commit is contained in:
Klaus Schmidinger
2006-04-29 13:23:15 +02:00
parent 56468f72ad
commit 7367b6a832
3 changed files with 4 additions and 2 deletions

View File

@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recording.c 1.147 2006/04/23 10:43:06 kls Exp $
* $Id: recording.c 1.148 2006/04/29 13:22:20 kls Exp $
*/
#include "recording.h"
@@ -1436,7 +1436,7 @@ cUnbufferedFile *cFileName::Open(void)
void cFileName::Close(void)
{
if (file) {
if ((record && CloseVideoFile(file) < 0) || (!record && file->Close() < 0))
if (CloseVideoFile(file) < 0)
LOG_ERROR_STR(fileName);
file = NULL;
}