diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2021-08-08 16:44:48 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2021-08-08 16:44:48 +0200 |
commit | 615487401fd79c62ea42ad15ad3740995030ec5c (patch) | |
tree | f39e0150d06a32f8ce256bac53d021b9f25afebe /src/namestore | |
parent | 9b0697c03ccba29f5130509b2affe7ee5bbea2b3 (diff) | |
download | gnunet-615487401fd79c62ea42ad15ad3740995030ec5c.tar.gz gnunet-615487401fd79c62ea42ad15ad3740995030ec5c.zip |
-fix nptr issues
Diffstat (limited to 'src/namestore')
-rw-r--r-- | src/namestore/gnunet-namestore-fcfsd.c | 12 | ||||
-rw-r--r-- | src/namestore/plugin_rest_namestore.c | 6 |
2 files changed, 12 insertions, 6 deletions
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); |