From: Fredrik Tolf Date: Thu, 30 Aug 2007 01:28:06 +0000 (+0200) Subject: Fix segv bug in checkhashes. X-Git-Tag: 1.0~47 X-Git-Url: http://git.dolda2000.com/gitweb/?p=doldaconnect.git;a=commitdiff_plain;h=1104a3d449ca71696d000ac4d9c253ecf66ba3e6 Fix segv bug in checkhashes. --- 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)