From 39d195cdbb82baaf20714841d87f865caea5573d Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Mon, 2 Jul 2012 18:40:58 +0000 Subject: [PATCH] -fix --- src/gns/gnunet-service-gns_resolver.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index f86b07f67..af90b28fa 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c @@ -2453,9 +2453,9 @@ process_delegation_result_dht(void* cls, if (NULL != rh->rd.data) GNUNET_free ((void*)rh->rd.data); - - rh->rd.data = GNUNET_malloc (rd[i].data_size); + memcpy (&rh->rd, &rd[i], sizeof (struct GNUNET_NAMESTORE_RecordData)); + rh->rd.data = GNUNET_malloc (rd[i].data_size); memcpy ((void*)(rh->rd.data), rd[i].data, rd[i].data_size); rh->rd_count = 1; @@ -3447,8 +3447,8 @@ process_delegation_result_ns (void* cls, if (NULL != rh->rd.data) GNUNET_free ((void*)(rh->rd.data)); - rh->rd.data = GNUNET_malloc (rd[i].data_size); memcpy (&rh->rd, &rd[i], sizeof (struct GNUNET_NAMESTORE_RecordData)); + rh->rd.data = GNUNET_malloc (rd[i].data_size); memcpy ((void*)rh->rd.data, rd[i].data, rd[i].data_size); rh->rd_count = 1; /* Check for key revocation and delegate */ -- 2.25.1