[ANNOUNCE] VDR developer version 1.3.49 - Memleak

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Klaus Schmidinger wrote:

> Thanks - applied for version 1.4.0.


I'm afraid I've found another minor memory leak. Valgrind would really
be worth it's money, if it wouldn't be free :-)

When playing back a recording, the file handle gets closed, but not the
cUnbufferedFile object. I'm not sure why a distinction is made between
recording and not recording when closing the file, so I just use
CloseVideoFile() in both cases, which correctly frees the object. Hope
this is correct. See attached patch.

Regards,

Tobias
-------------- next part --------------
--- vdr-1.3.49.orig/recording.c
+++ vdr-1.3.49/recording.c
@@ -1436,7 +1436,7 @@
 void cFileName::Close(void)
 {
   if (file) {
-     if ((record && CloseVideoFile(file) < 0) || (!record && file->Close() < 0))
+     if (CloseVideoFile(file))
         LOG_ERROR_STR(fileName);
      file = NULL;
      }

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux