delete temporary files / clean up properly
authorChristian Grothoff <christian@grothoff.org>
Sat, 17 Oct 2009 20:04:21 +0000 (20:04 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 17 Oct 2009 20:04:21 +0000 (20:04 +0000)
src/datacache/datacache.c
src/datacache/test_datacache_quota.c

index afdfb0c4c8b651cba6c8c46d6f3653f2858183b0..bfd48ff63bf127b37db89888d18338909afb70f0 100644 (file)
@@ -151,9 +151,8 @@ GNUNET_DATACACHE_create (struct GNUNET_SCHEDULER_Handle *sched,
   bf_size = quota / 32; /* 8 bit per entry, 1 bit per 32 kb in DB */
 
   ret = GNUNET_malloc (sizeof(struct GNUNET_DATACACHE_Handle));
-  ret->bloom_name = GNUNET_DISK_mktemp ("datacachebloom");
-
-  if (ret->bloom_name)
+  ret->bloom_name = GNUNET_DISK_mktemp ("gnunet-datacachebloom");
+  if (NULL != ret->bloom_name)
     {
       ret->filter = GNUNET_CONTAINER_bloomfilter_load (ret->bloom_name, 
                                                       quota / 1024,    /* 8 bit per entry in DB, expect 1k entries */
index 1cad2a907f5c4e7e989df7a210d49b07aacaf0b1..dc6917c36a6109689c8958f1a0b46bcaf7b5cb91 100644 (file)
@@ -101,6 +101,7 @@ run (void *cls,
       k = n;
     }
   fprintf (stderr, "\n");
+  GNUNET_DATACACHE_destroy (h);
   return;
 FAILURE:
   if (h != NULL)