From 2bf541d1fe6b740aca0f31d3873679a82b79dd39 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Mon, 7 Jun 2010 23:19:22 +0200 Subject: [PATCH] Only look for .tmp. in basename in traverse_fn --- cleanup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cleanup.c b/cleanup.c index cac014c44..97f9f8ecc 100644 --- a/cleanup.c +++ b/cleanup.c @@ -96,7 +96,7 @@ static void traverse_fn(const char *fname, struct stat *st) return; } - if (strstr(fname, ".tmp.") != NULL) { + if (strstr(p, ".tmp.") != NULL) { /* delete any tmp files older than 1 hour */ if (st->st_mtime + 3600 < time(NULL)) { unlink(fname); @@ -105,7 +105,6 @@ static void traverse_fn(const char *fname, struct stat *st) } } - free(p); if (num_files == allocated) { -- 2.47.3