aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2021-08-08 16:44:48 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2021-08-08 16:44:48 +0200
commit615487401fd79c62ea42ad15ad3740995030ec5c (patch)
treef39e0150d06a32f8ce256bac53d021b9f25afebe
parent9b0697c03ccba29f5130509b2affe7ee5bbea2b3 (diff)
downloadgnunet-615487401fd79c62ea42ad15ad3740995030ec5c.tar.gz
gnunet-615487401fd79c62ea42ad15ad3740995030ec5c.zip
-fix nptr issues
-rw-r--r--src/datastore/datastore_api.c4
-rw-r--r--src/namestore/gnunet-namestore-fcfsd.c12
-rw-r--r--src/namestore/plugin_rest_namestore.c6
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,
1400 LOG (GNUNET_ERROR_TYPE_DEBUG, 1400 LOG (GNUNET_ERROR_TYPE_DEBUG,
1401 "Asked to look for data of type %u under key `%s'\n", 1401 "Asked to look for data of type %u under key `%s'\n",
1402 (unsigned int) type, 1402 (unsigned int) type,
1403 GNUNET_h2s (key)); 1403 (NULL != key) ? GNUNET_h2s (key) : "NULL");
1404 if (NULL == key) 1404 if (NULL == key)
1405 { 1405 {
1406 env = GNUNET_MQ_msg (gm, 1406 env = GNUNET_MQ_msg (gm,
@@ -1430,7 +1430,7 @@ GNUNET_DATASTORE_get_key (struct GNUNET_DATASTORE_Handle *h,
1430 { 1430 {
1431 LOG (GNUNET_ERROR_TYPE_DEBUG, 1431 LOG (GNUNET_ERROR_TYPE_DEBUG,
1432 "Could not queue request for `%s'\n", 1432 "Could not queue request for `%s'\n",
1433 GNUNET_h2s (key)); 1433 (NULL != key) ? GNUNET_h2s (key): "NULL");
1434 return NULL; 1434 return NULL;
1435 } 1435 }
1436#if INSANE_STATISTICS 1436#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)
185 } 185 }
186 if (NULL != notfound_page) 186 if (NULL != notfound_page)
187 { 187 {
188 MHD_destroy_response (main_page->response); 188 MHD_destroy_response (notfound_page->response);
189 GNUNET_free (main_page->handle); 189 GNUNET_free (notfound_page->handle);
190 GNUNET_free (main_page); 190 GNUNET_free (notfound_page);
191 } 191 }
192 if (NULL != forbidden_page) 192 if (NULL != forbidden_page)
193 { 193 {
194 MHD_destroy_response (main_page->response); 194 MHD_destroy_response (forbidden_page->response);
195 GNUNET_free (main_page->handle); 195 GNUNET_free (forbidden_page->handle);
196 GNUNET_free (main_page); 196 GNUNET_free (forbidden_page);
197 } 197 }
198 198
199 if (NULL != namestore) 199 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,
955 state = ID_REST_STATE_POST_INIT; 955 state = ID_REST_STATE_POST_INIT;
956 return; 956 return;
957 } 957 }
958 if (NULL == ego)
959 {
960 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
961 "Called with NULL ego\n");
962 return;
963 }
958 if (ID_REST_STATE_INIT == state) 964 if (ID_REST_STATE_INIT == state)
959 { 965 {
960 ego_entry = GNUNET_new (struct EgoEntry); 966 ego_entry = GNUNET_new (struct EgoEntry);