gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r23682 - gnunet/src/gns


From: gnunet
Subject: [GNUnet-SVN] r23682 - gnunet/src/gns
Date: Thu, 6 Sep 2012 18:41:48 +0200

Author: schanzen
Date: 2012-09-06 18:41:48 +0200 (Thu, 06 Sep 2012)
New Revision: 23682

Modified:
   gnunet/src/gns/gnunet-gns-proxy.c
   gnunet/src/gns/gnunet-gns.c
   gnunet/src/gns/test_gns_simple_lookup.c
Log:
-coverity

Modified: gnunet/src/gns/gnunet-gns-proxy.c
===================================================================
--- gnunet/src/gns/gnunet-gns-proxy.c   2012-09-06 16:24:41 UTC (rev 23681)
+++ gnunet/src/gns/gnunet-gns-proxy.c   2012-09-06 16:41:48 UTC (rev 23682)
@@ -587,6 +587,7 @@
     memcpy (new_value, pdata->value, pdata->total_bytes);
     memcpy (new_value+off, data, size);
     GNUNET_free (pdata->value);
+    pdata->value = new_value;
     pdata->total_bytes += size;
 
     return MHD_YES;
@@ -2109,11 +2110,11 @@
     {
       if (GNUNET_YES == ctask->is_httppost)
       {
-        i = 0;
         for (upload_data_iter = ctask->upload_data_head;
              NULL != upload_data_iter;
              upload_data_iter = upload_data_iter->next)
         {
+          i = 0;
           if (NULL != upload_data_iter->filename)
           {
             forms[i].option = CURLFORM_FILENAME;

Modified: gnunet/src/gns/gnunet-gns.c
===================================================================
--- gnunet/src/gns/gnunet-gns.c 2012-09-06 16:24:41 UTC (rev 23681)
+++ gnunet/src/gns/gnunet-gns.c 2012-09-06 16:41:48 UTC (rev 23682)
@@ -242,7 +242,7 @@
     if (!raw)
       GNUNET_log (GNUNET_ERROR_TYPE_INFO,
                   "No private zone key file name specified in 
configuration!\n");
-    shorten_key = NULL;
+    private_key = NULL;
   }
   else
   {
@@ -290,7 +290,7 @@
     return;
   }
   
-  if (NULL != shorten_name)
+  if ((NULL != shorten_name) && (NULL != shorten_zone) && (NULL != 
private_zone))
   {
     shorten_request = GNUNET_GNS_shorten_zone (gns, shorten_name,
                              private_zone,

Modified: gnunet/src/gns/test_gns_simple_lookup.c
===================================================================
--- gnunet/src/gns/test_gns_simple_lookup.c     2012-09-06 16:24:41 UTC (rev 
23681)
+++ gnunet/src/gns/test_gns_simple_lookup.c     2012-09-06 16:41:48 UTC (rev 
23682)
@@ -186,6 +186,7 @@
   if (NULL == namestore_handle)
   {
     GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to connect to namestore\n");
+    GNUNET_free (web);
     end_badly_now () ;
     return;
   }
@@ -195,6 +196,7 @@
                                                           &alice_keyfile))
   {
     GNUNET_log(GNUNET_ERROR_TYPE_ERROR, "Failed to get key from cfg\n");
+    GNUNET_free (web);
     end_badly_now () ;
     return;
   }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]