diff options
Diffstat (limited to 'src/namestore/test_namestore_api_store.c')
-rw-r--r-- | src/namestore/test_namestore_api_store.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/namestore/test_namestore_api_store.c b/src/namestore/test_namestore_api_store.c index 5bd0c3472..ab211aeae 100644 --- a/src/namestore/test_namestore_api_store.c +++ b/src/namestore/test_namestore_api_store.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 | ||
@@ -56,11 +56,6 @@ cleanup () | |||
56 | GNUNET_NAMESTORE_disconnect (nsh); | 56 | GNUNET_NAMESTORE_disconnect (nsh); |
57 | nsh = NULL; | 57 | nsh = NULL; |
58 | } | 58 | } |
59 | if (NULL != privkey) | ||
60 | { | ||
61 | GNUNET_free (privkey); | ||
62 | privkey = NULL; | ||
63 | } | ||
64 | GNUNET_SCHEDULER_shutdown (); | 59 | GNUNET_SCHEDULER_shutdown (); |
65 | } | 60 | } |
66 | 61 | ||
@@ -118,9 +113,8 @@ run (void *cls, | |||
118 | 113 | ||
119 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, | 114 | endbadly_task = GNUNET_SCHEDULER_add_delayed (TIMEOUT, |
120 | &endbadly, NULL); | 115 | &endbadly, NULL); |
121 | privkey = GNUNET_CRYPTO_ecdsa_key_create (); | 116 | GNUNET_CRYPTO_ecdsa_key_create (&privkey); |
122 | GNUNET_assert (privkey != NULL); | 117 | GNUNET_CRYPTO_ecdsa_key_get_public (&privkey, &pubkey); |
123 | GNUNET_CRYPTO_ecdsa_key_get_public (privkey, &pubkey); | ||
124 | 118 | ||
125 | 119 | ||
126 | rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us; | 120 | rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us; |
@@ -133,7 +127,7 @@ run (void *cls, | |||
133 | nsh = GNUNET_NAMESTORE_connect (cfg); | 127 | nsh = GNUNET_NAMESTORE_connect (cfg); |
134 | GNUNET_break (NULL != nsh); | 128 | GNUNET_break (NULL != nsh); |
135 | nsqe = GNUNET_NAMESTORE_records_store (nsh, | 129 | nsqe = GNUNET_NAMESTORE_records_store (nsh, |
136 | privkey, | 130 | &privkey, |
137 | name, | 131 | name, |
138 | 1, | 132 | 1, |
139 | &rd, | 133 | &rd, |