X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=daemon%2Fclient.c;fp=daemon%2Fclient.c;h=e493a884ce47f449b80ea86ad3e1901dffce9c54;hb=5760093c6a76eee741d70f8b8d71e9e52bd655ee;hp=46766e94e459d46d290f37d7592cee856ddd754e;hpb=5d86aecd3086d81f88391d5dd190faf3a2b816d8;p=doldaconnect.git diff --git a/daemon/client.c b/daemon/client.c index 46766e9..e493a88 100644 --- a/daemon/client.c +++ b/daemon/client.c @@ -294,8 +294,10 @@ static void readhashcache(void) if((stream = fopen(hcname, "r")) == NULL) { flog(LOG_WARNING, "could not open hash cache %s: %s", hcname, strerror(errno)); + free(hcname); return; } + free(hcname); while(hashcache != NULL) freehashcache(hashcache); line = 0; @@ -369,8 +371,10 @@ static void writehashcache(int now) if((stream = fopen(hcname, "w")) == NULL) { flog(LOG_WARNING, "could not write hash cache %s: %s", hcname, strerror(errno)); + free(hcname); return; } + free(hcname); fprintf(stream, "# Dolda Connect hash cache file\n"); fprintf(stream, "# Generated automatically, do not edit\n"); fprintf(stream, "# Format: DEVICE INODE MTIME [HASH...]\n");