diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-04-11 21:43:28 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-04-11 21:43:34 +0200 |
commit | 90ff9edfa9c5fcfa3a36d1653ff105e89b888e21 (patch) | |
tree | 780a2071f5072c8e8e044db741eb295c3f3ea2a7 /src/namestore/test_namestore_api_remove.c | |
parent | 3bcfe59f1ce533246bda271f00b3ee957cae304d (diff) | |
download | gnunet-90ff9edfa9c5fcfa3a36d1653ff105e89b888e21.tar.gz gnunet-90ff9edfa9c5fcfa3a36d1653ff105e89b888e21.zip |
fixing #6149
Diffstat (limited to 'src/namestore/test_namestore_api_remove.c')
-rw-r--r-- | src/namestore/test_namestore_api_remove.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/namestore/test_namestore_api_remove.c b/src/namestore/test_namestore_api_remove.c index ff826804e..3f0c4c123 100644 --- a/src/namestore/test_namestore_api_remove.c +++ b/src/namestore/test_namestore_api_remove.c | |||
@@ -39,7 +39,7 @@ static struct GNUNET_NAMESTORE_Handle *nsh; | |||
39 | 39 | ||
40 | static struct GNUNET_SCHEDULER_Task *endbadly_task; | 40 | static struct GNUNET_SCHEDULER_Task *endbadly_task; |
41 | 41 | ||
42 | static struct GNUNET_CRYPTO_EcdsaPrivateKey *privkey; | 42 | static struct GNUNET_CRYPTO_EcdsaPrivateKey privkey; |
43 | 43 | ||
44 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; | 44 | static struct GNUNET_CRYPTO_EcdsaPublicKey pubkey; |
45 | 45 | ||
@@ -58,11 +58,6 @@ cleanup () | |||
58 | GNUNET_NAMESTORE_disconnect (nsh); | 58 | GNUNET_NAMESTORE_disconnect (nsh); |
59 | nsh = NULL; | 59 | nsh = NULL; |
60 | } | 60 | } |
61 | if (NULL != privkey) | ||
62 | { | ||
63 | GNUNET_free (privkey); | ||
64 | privkey = NULL; | ||
65 | } | ||
66 | GNUNET_SCHEDULER_shutdown (); | 61 | GNUNET_SCHEDULER_shutdown (); |
67 | } | 62 | } |
68 | 63 | ||
@@ -145,7 +140,7 @@ put_cont (void *cls, | |||
145 | name, | 140 | name, |
146 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); | 141 | (success == GNUNET_OK) ? "SUCCESS" : "FAIL"); |
147 | nsqe = GNUNET_NAMESTORE_records_store (nsh, | 142 | nsqe = GNUNET_NAMESTORE_records_store (nsh, |
148 | privkey, | 143 | &privkey, |
149 | name, | 144 | name, |
150 | 0, NULL, | 145 | 0, NULL, |
151 | &remove_cont, (void *) name); | 146 | &remove_cont, (void *) name); |
@@ -163,9 +158,8 @@ run (void *cls, | |||
163 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 158 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
164 | &endbadly, | 159 | &endbadly, |
165 | NULL); | 160 | NULL); |
166 | privkey = GNUNET_CRYPTO_ecdsa_key_create (); | 161 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); |
167 | GNUNET_assert (privkey != NULL); | 162 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, |
168 | GNUNET_CRYPTO_ecdsa_key_get_public (privkey, | ||
169 | &pubkey); | 163 | &pubkey); |
170 | 164 | ||
171 | removed = GNUNET_NO; | 165 | removed = GNUNET_NO; |
@@ -182,7 +176,7 @@ run (void *cls, | |||
182 | nsh = GNUNET_NAMESTORE_connect (cfg); | 176 | nsh = GNUNET_NAMESTORE_connect (cfg); |
183 | GNUNET_break (NULL != nsh); | 177 | GNUNET_break (NULL != nsh); |
184 | nsqe = GNUNET_NAMESTORE_records_store (nsh, | 178 | nsqe = GNUNET_NAMESTORE_records_store (nsh, |
185 | privkey, | 179 | &privkey, |
186 | name, | 180 | name, |
187 | 1, | 181 | 1, |
188 | &rd, | 182 | &rd, |