aboutsummaryrefslogtreecommitdiff
path: root/src/dns
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-06-25 20:02:21 +0200
committerChristian Grothoff <christian@grothoff.org>2018-06-25 20:02:21 +0200
commit2d22da9b531933db65f80ce12b11dd917a387eeb (patch)
treeb4b00e94ce1b577a161d384569600d3aa659687c /src/dns
parent08c862f4f45eabab77f5b28753c6fe22786db455 (diff)
downloadgnunet-2d22da9b531933db65f80ce12b11dd917a387eeb.tar.gz
gnunet-2d22da9b531933db65f80ce12b11dd917a387eeb.zip
fix leak
Diffstat (limited to 'src/dns')
-rw-r--r--src/dns/gnunet-zonewalk.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/dns/gnunet-zonewalk.c b/src/dns/gnunet-zonewalk.c
index c43ad1aeb..b96d40ca7 100644
--- a/src/dns/gnunet-zonewalk.c
+++ b/src/dns/gnunet-zonewalk.c
@@ -494,6 +494,7 @@ queue (const char *hostname)
494 struct Request *req; 494 struct Request *req;
495 char *raw; 495 char *raw;
496 size_t raw_size; 496 size_t raw_size;
497 int ret;
497 498
498 if (GNUNET_OK != 499 if (GNUNET_OK !=
499 GNUNET_DNSPARSER_check_name (hostname)) 500 GNUNET_DNSPARSER_check_name (hostname))
@@ -514,13 +515,14 @@ queue (const char *hostname)
514 p.queries = &q; 515 p.queries = &q;
515 p.id = (uint16_t) GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE, 516 p.id = (uint16_t) GNUNET_CRYPTO_random_u32 (GNUNET_CRYPTO_QUALITY_NONCE,
516 UINT16_MAX); 517 UINT16_MAX);
517 518 ret = GNUNET_DNSPARSER_pack (&p,
518 if (GNUNET_OK != 519 UINT16_MAX,
519 GNUNET_DNSPARSER_pack (&p, 520 &raw,
520 UINT16_MAX, 521 &raw_size);
521 &raw, 522 if (GNUNET_OK != ret)
522 &raw_size))
523 { 523 {
524 if (GNUNET_NO == ret)
525 GNUNET_free (raw);
524 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 526 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
525 "Failed to pack query for hostname `%s'\n", 527 "Failed to pack query for hostname `%s'\n",
526 hostname); 528 hostname);