diff options
Diffstat (limited to 'src/namestore/test_namestore_api_lookup_nick.c')
-rw-r--r-- | src/namestore/test_namestore_api_lookup_nick.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/namestore/test_namestore_api_lookup_nick.c b/src/namestore/test_namestore_api_lookup_nick.c index 628e76254..14fe7fc70 100644 --- a/src/namestore/test_namestore_api_lookup_nick.c +++ b/src/namestore/test_namestore_api_lookup_nick.c | |||
@@ -54,11 +54,12 @@ static struct GNUNET_NAMESTORE_QueueEntry *nsqe; | |||
54 | // static const char * name = "dummy.dummy.gnunet"; | 54 | // static const char * name = "dummy.dummy.gnunet"; |
55 | static const char *name = "d"; | 55 | static const char *name = "d"; |
56 | 56 | ||
57 | static char *record_data; | ||
57 | 58 | ||
58 | static void | 59 | static void |
59 | cleanup () | 60 | cleanup () |
60 | { | 61 | { |
61 | GNUNET_free_non_null ((void *) rd_orig.data); | 62 | GNUNET_free (record_data); |
62 | if (NULL != nsh) | 63 | if (NULL != nsh) |
63 | { | 64 | { |
64 | GNUNET_NAMESTORE_disconnect (nsh); | 65 | GNUNET_NAMESTORE_disconnect (nsh); |
@@ -264,7 +265,8 @@ nick_cont (void *cls, int32_t success, const char *emsg) | |||
264 | rd_orig.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us; | 265 | rd_orig.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us; |
265 | rd_orig.record_type = TEST_RECORD_TYPE; | 266 | rd_orig.record_type = TEST_RECORD_TYPE; |
266 | rd_orig.data_size = TEST_RECORD_DATALEN; | 267 | rd_orig.data_size = TEST_RECORD_DATALEN; |
267 | rd_orig.data = GNUNET_malloc (TEST_RECORD_DATALEN); | 268 | record_data = GNUNET_malloc (TEST_RECORD_DATALEN); |
269 | rd_orig.data = record_data; | ||
268 | rd_orig.flags = 0; | 270 | rd_orig.flags = 0; |
269 | memset ((char *) rd_orig.data, 'a', TEST_RECORD_DATALEN); | 271 | memset ((char *) rd_orig.data, 'a', TEST_RECORD_DATALEN); |
270 | 272 | ||