gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] branch master updated: -fix nptr issues


From: gnunet
Subject: [gnunet] branch master updated: -fix nptr issues
Date: Sun, 08 Aug 2021 16:48:32 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 615487401 -fix nptr issues
615487401 is described below

commit 615487401fd79c62ea42ad15ad3740995030ec5c
Author: Martin Schanzenbach <mschanzenbach@posteo.de>
AuthorDate: Sun Aug 8 16:44:48 2021 +0200

    -fix nptr issues
---
 src/datastore/datastore_api.c          |  4 ++--
 src/namestore/gnunet-namestore-fcfsd.c | 12 ++++++------
 src/namestore/plugin_rest_namestore.c  |  6 ++++++
 3 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/datastore/datastore_api.c b/src/datastore/datastore_api.c
index d658b9c85..a49bc8586 100644
--- a/src/datastore/datastore_api.c
+++ b/src/datastore/datastore_api.c
@@ -1400,7 +1400,7 @@ GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle 
*h,
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "Asked to look for data of type %u under key `%s'\n",
        (unsigned int) type,
-       GNUNET_h2s (key));
+       (NULL != key) ? GNUNET_h2s (key) : "NULL");
   if (NULL == key)
   {
     env = GNUNET_MQ_msg (gm,
@@ -1430,7 +1430,7 @@ GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle 
*h,
   {
     LOG (GNUNET_ERROR_TYPE_DEBUG,
          "Could not queue request for `%s'\n",
-         GNUNET_h2s (key));
+         (NULL != key) ? GNUNET_h2s (key): "NULL");
     return NULL;
   }
 #if INSANE_STATISTICS
diff --git a/src/namestore/gnunet-namestore-fcfsd.c 
b/src/namestore/gnunet-namestore-fcfsd.c
index 847f7cb64..95d4c5878 100644
--- a/src/namestore/gnunet-namestore-fcfsd.c
+++ b/src/namestore/gnunet-namestore-fcfsd.c
@@ -185,15 +185,15 @@ do_shutdown (void *cls)
   }
   if (NULL != notfound_page)
   {
-    MHD_destroy_response (main_page->response);
-    GNUNET_free (main_page->handle);
-    GNUNET_free (main_page);
+    MHD_destroy_response (notfound_page->response);
+    GNUNET_free (notfound_page->handle);
+    GNUNET_free (notfound_page);
   }
   if (NULL != forbidden_page)
   {
-    MHD_destroy_response (main_page->response);
-    GNUNET_free (main_page->handle);
-    GNUNET_free (main_page);
+    MHD_destroy_response (forbidden_page->response);
+    GNUNET_free (forbidden_page->handle);
+    GNUNET_free (forbidden_page);
   }
 
   if (NULL != namestore)
diff --git a/src/namestore/plugin_rest_namestore.c 
b/src/namestore/plugin_rest_namestore.c
index ae93e5eff..ff5494dc7 100644
--- a/src/namestore/plugin_rest_namestore.c
+++ b/src/namestore/plugin_rest_namestore.c
@@ -955,6 +955,12 @@ list_ego (void *cls,
     state = ID_REST_STATE_POST_INIT;
     return;
   }
+  if (NULL == ego)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+                "Called with NULL ego\n");
+    return;
+  }
   if (ID_REST_STATE_INIT == state)
   {
     ego_entry = GNUNET_new (struct EgoEntry);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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