cppcheck: VDR 1.7.18: [recording.c:1130]: (error) Allocation with UpdateFileName, TouchFile doesn't release it.

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

 



Dear VDR folks,


using Cppcheck 1.49 [1] to check VDR 1.7.18 the above error is shown.
Unfortunately I do not know how to fix this.

The following methods are the following (from two files).

        void cRecordings::TouchUpdate(void)
        {
          bool needsUpdate = NeedsUpdate();
          TouchFile(UpdateFileName());
          if (!needsUpdate)
             lastUpdate = time(NULL); // make sure we don't tigger ourselves
        }

        const char *cRecordings::UpdateFileName(void)
        {
          if (!updateFileName)
             updateFileName = strdup(AddDirectory(VideoDirectory, ".update"));
          return updateFileName;
        }

        void TouchFile(const char *FileName)
        {
          if (utime(FileName, NULL) == -1 && errno != ENOENT)
             LOG_ERROR_STR(FileName);
        }


Thanks,

Paul


[1] http://cppcheck.sourceforge.net/

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[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