summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-02-12 10:19:03 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2005-02-12 10:19:03 +0100
commit5b4507da05453538b40d6c8801223238b11cc482 (patch)
tree870a31634a799acc1a3f81e98832880b88dd7587 /recording.c
parent7f244d5c9c6a176bd1008f0ea10c9649dba7c1a9 (diff)
downloadvdr-5b4507da05453538b40d6c8801223238b11cc482.tar.gz
vdr-5b4507da05453538b40d6c8801223238b11cc482.tar.bz2
Fixed handling symbolic links in cRecordings::ScanVideoDir()
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/recording.c b/recording.c
index c6460f27..e50dfcb7 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 1.95 2005/02/06 09:46:31 kls Exp $
+ * $Id: recording.c 1.96 2005/02/12 10:17:47 kls Exp $
*/
#include "recording.h"
@@ -637,8 +637,9 @@ void cRecordings::ScanVideoDir(const char *DirName)
struct stat st;
if (stat(buffer, &st) == 0) {
if (S_ISLNK(st.st_mode)) {
- free(buffer);
- buffer = ReadLink(buffer);
+ char *old = buffer;
+ buffer = ReadLink(old);
+ free(old);
if (!buffer)
continue;
if (stat(buffer, &st) != 0) {