From 36331bf786303653c1a56c7718ee64dd0b37a70f Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Mon, 6 Jul 2020 19:51:54 +0200 Subject: -fix: namestore test keys --- src/namestore/test_namestore_api_lookup_nick.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/namestore/test_namestore_api_lookup_nick.c') diff --git a/src/namestore/test_namestore_api_lookup_nick.c b/src/namestore/test_namestore_api_lookup_nick.c index 2fbd9d7cb..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; // static const char * name = "dummy.dummy.gnunet"; static const char *name = "d"; +static char *record_data; static void cleanup () { - GNUNET_free ((void *) rd_orig.data); + GNUNET_free (record_data); if (NULL != nsh) { GNUNET_NAMESTORE_disconnect (nsh); @@ -264,7 +265,8 @@ nick_cont (void *cls, int32_t success, const char *emsg) rd_orig.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us; rd_orig.record_type = TEST_RECORD_TYPE; rd_orig.data_size = TEST_RECORD_DATALEN; - rd_orig.data = GNUNET_malloc (TEST_RECORD_DATALEN); + record_data = GNUNET_malloc (TEST_RECORD_DATALEN); + rd_orig.data = record_data; rd_orig.flags = 0; memset ((char *) rd_orig.data, 'a', TEST_RECORD_DATALEN); -- cgit v1.2.3