-fix
[oweals/gnunet.git] / src / fs / fs_unindex.c
index 9e477c1111518055e8a7263729ab41bd560e0002..bf619b75acf127c48e66969231b7b984044d99ea 100644 (file)
@@ -405,6 +405,7 @@ continue_after_remove (void *cls,
 {
   struct GNUNET_FS_UnindexContext *uc = cls;
 
+  uc->dqe = NULL;
   if (success != GNUNET_YES)  
     GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
                _("Failed to remove KBlock: %s\n"),
@@ -511,6 +512,7 @@ process_kblock_for_unindex (void *cls,
     GNUNET_FS_uri_destroy (chk_uri);
     goto get_next;
   }
+  GNUNET_FS_uri_destroy (chk_uri);
   /* matches! */
   uc->dqe = GNUNET_DATASTORE_remove (uc->dsh,
                                     key, size, data,
@@ -753,7 +755,7 @@ GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h, const char *filename,
   struct GNUNET_FS_ProgressInfo pi;
   uint64_t size;
 
-  if (GNUNET_OK != GNUNET_DISK_file_size (filename, &size, GNUNET_YES))
+  if (GNUNET_OK != GNUNET_DISK_file_size (filename, &size, GNUNET_YES, GNUNET_YES))
     return NULL;
   ret = GNUNET_malloc (sizeof (struct GNUNET_FS_UnindexContext));
   ret->h = h;