fixes
authorChristian Grothoff <christian@grothoff.org>
Thu, 1 Apr 2010 09:41:57 +0000 (09:41 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 1 Apr 2010 09:41:57 +0000 (09:41 +0000)
src/fs/fs_download.c
src/fs/fs_namespace.c
src/fs/gnunet-pseudonym.c
src/fs/test_fs_namespace.c
src/transport/transport_api_address_lookup.c

index 46759f495508d69bfacabb591e21aee44d9c71c1..342299e4f9d6f0f5e84c707c16ff4d5306f2c840 100644 (file)
@@ -529,15 +529,15 @@ process_result_with_request (void *cls,
                             &skey,
                             &iv,
                             pt);
+  off = compute_disk_offset (GNUNET_ntohll (dc->uri->data.chk.file_length),
+                            sm->offset,
+                            sm->depth,
+                            dc->treedepth);
   /* save to disk */
   if ( (NULL != dc->handle) &&
        ( (sm->depth == dc->treedepth) ||
         (0 == (dc->options & GNUNET_FS_DOWNLOAD_NO_TEMPORARIES)) ) )
     {
-      off = compute_disk_offset (GNUNET_ntohll (dc->uri->data.chk.file_length),
-                                sm->offset,
-                                sm->depth,
-                                dc->treedepth);
       emsg = NULL;
 #if DEBUG_DOWNLOAD
       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
index c040bad7653c4f8bc06bd0ca309dda23fd2db740..873494c4f4e184381834a4ad2507ccfdc492763c 100644 (file)
@@ -234,6 +234,7 @@ GNUNET_FS_namespace_create (struct GNUNET_FS_Handle *h,
                   dn,
                   DIR_SEPARATOR_STR,
                   name);
+  GNUNET_free (dn);
   ret = GNUNET_malloc (sizeof (struct GNUNET_FS_Namespace));
   ret->rc = 1;
   ret->key = GNUNET_CRYPTO_rsa_key_create_from_file (fn);
index b8bd12b35dcbe7897b8224c222d7b2a37e59c2ae..b0b53c9254c822b2e2987d19e78b98e094b28fe2 100644 (file)
@@ -205,10 +205,9 @@ post_advertising (void *cls,
                                           rating_change,
                                           &nsid))
            {
-             GNUNET_PSEUDONYM_rank (cfg,
-                                    &nsid,
-                                    delta);
-             
+             (void) GNUNET_PSEUDONYM_rank (cfg,
+                                           &nsid,
+                                           delta);           
            }
          else
            {
@@ -310,6 +309,7 @@ run (void *cls,
                                     GNUNET_FS_PUBLISH_OPTION_NONE,
                                     &post_advertising,
                                     NULL);
+             GNUNET_FS_uri_destroy (ns_uri);
              return;
            }
        }
index 9e02521a82d6ad42375b279a2e29258fa2dc2215..2f3aabbf6c82391057a9c83aa7311de01631ab6f 100644 (file)
@@ -259,6 +259,7 @@ publish_cont (void *cls,
               msg);
       err = 1;
       GNUNET_FS_stop (fs);
+      GNUNET_free (msg);
       return;
     }
   fprintf (stderr, "Starting keyword search...\n");
index cd2e735843e9a6347277acf10fff0cd91607a0b2..689e553b38b3e02f0d68a3ed5bc10239038bce77 100644 (file)
@@ -167,12 +167,13 @@ GNUNET_TRANSPORT_address_lookup (struct GNUNET_SCHEDULER_Handle *sched,
   aluCB->cb_cls = aluc_cls;
   aluCB->timeout = abs_timeout;
   aluCB->client = client;
-  GNUNET_CLIENT_transmit_and_get_response (client, 
-                                          &msg->header, 
-                                          timeout,
-                                           GNUNET_YES,
-                                           &address_response_processor,
-                                           aluCB);
+  GNUNET_assert (GNUNET_OK ==
+                GNUNET_CLIENT_transmit_and_get_response (client, 
+                                                         &msg->header, 
+                                                         timeout,
+                                                         GNUNET_YES,
+                                                         &address_response_processor,
+                                                         aluCB));
   GNUNET_free (msg);
 }