summaryrefslogtreecommitdiff
path: root/src/util/dnsparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/dnsparser.c')
-rw-r--r--src/util/dnsparser.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/util/dnsparser.c b/src/util/dnsparser.c
index fcec0d4f1..f187803bc 100644
--- a/src/util/dnsparser.c
+++ b/src/util/dnsparser.c
@@ -38,9 +38,6 @@
38#include <idn/idna.h> 38#include <idn/idna.h>
39#endif 39#endif
40#endif 40#endif
41#if WINDOWS
42#include <idn-free.h>
43#endif
44#include "gnunet_util_lib.h" 41#include "gnunet_util_lib.h"
45 42
46 43
@@ -65,11 +62,7 @@ GNUNET_DNSPARSER_check_label(const char *label)
65 if (IDNA_SUCCESS != idna_to_ascii_8z(label, &output, IDNA_ALLOW_UNASSIGNED)) 62 if (IDNA_SUCCESS != idna_to_ascii_8z(label, &output, IDNA_ALLOW_UNASSIGNED))
66 return GNUNET_SYSERR; 63 return GNUNET_SYSERR;
67 slen = strlen(output); 64 slen = strlen(output);
68#if WINDOWS
69 idn_free(output);
70#else
71 free(output); 65 free(output);
72#endif
73 return (slen > 63) ? GNUNET_SYSERR : GNUNET_OK; 66 return (slen > 63) ? GNUNET_SYSERR : GNUNET_OK;
74} 67}
75 68
@@ -101,11 +94,7 @@ GNUNET_DNSPARSER_check_name(const char *name)
101 if (IDNA_SUCCESS != idna_to_ascii_8z(name, &output, IDNA_ALLOW_UNASSIGNED)) 94 if (IDNA_SUCCESS != idna_to_ascii_8z(name, &output, IDNA_ALLOW_UNASSIGNED))
102 return GNUNET_SYSERR; 95 return GNUNET_SYSERR;
103 slen = strlen(output); 96 slen = strlen(output);
104#if WINDOWS
105 idn_free(output);
106#else
107 free(output); 97 free(output);
108#endif
109 return (slen > 253) ? GNUNET_SYSERR : GNUNET_OK; 98 return (slen > 253) ? GNUNET_SYSERR : GNUNET_OK;
110} 99}
111 100
@@ -276,11 +265,7 @@ parse_name(const char *udp_payload,
276 { 265 {
277 GNUNET_free(tmp); 266 GNUNET_free(tmp);
278 GNUNET_asprintf(&tmp, "%s%s.", ret, utf8); 267 GNUNET_asprintf(&tmp, "%s%s.", ret, utf8);
279#if WINDOWS
280 idn_free(utf8);
281#else
282 free(utf8); 268 free(utf8);
283#endif
284 } 269 }
285 GNUNET_free(ret); 270 GNUNET_free(ret);
286 ret = tmp; 271 ret = tmp;
@@ -954,18 +939,10 @@ GNUNET_DNSPARSER_builder_add_name(char *dst,
954 while (NULL != dot); 939 while (NULL != dot);
955 dst[pos++] = '\0'; /* terminator */ 940 dst[pos++] = '\0'; /* terminator */
956 *off = pos; 941 *off = pos;
957#if WINDOWS
958 idn_free(idna_start);
959#else
960 free(idna_start); 942 free(idna_start);
961#endif
962 return GNUNET_OK; 943 return GNUNET_OK;
963fail: 944fail:
964#if WINDOWS
965 idn_free(idna_start);
966#else
967 free(idna_start); 945 free(idna_start);
968#endif
969 return GNUNET_NO; 946 return GNUNET_NO;
970} 947}
971 948