From 1104a3d449ca71696d000ac4d9c253ecf66ba3e6 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Thu, 30 Aug 2007 03:28:06 +0200 Subject: [PATCH] Fix segv bug in checkhashes. --- daemon/client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/client.c b/daemon/client.c index 63e40b2..bf30821 100644 --- a/daemon/client.c +++ b/daemon/client.c @@ -528,13 +528,14 @@ static int hashfile(char *path) */ static void checkhashes(void) { - struct sharecache *node; + struct sharecache *node, *next; struct hashcache *hc; char *path; node = shareroot->child; - for(node = shareroot->child; node != NULL; node = nextscnode(node)) + for(node = shareroot->child; node != NULL; node = next) { + next = nextscnode(node); if(node->f.b.type != FILE_REG) continue; if(!node->f.b.hastth) -- 2.11.0