ares_data.c: some NAPTR related fixes

pull/8/head
Yang Tse 13 years ago
parent 506d586276
commit 41f8ff5070
  1. 10
      ares_data.c

@ -1,5 +1,5 @@
/* Copyright (C) 2009-2010 by Daniel Stenberg /* Copyright (C) 2009-2012 by Daniel Stenberg
* *
* Permission to use, copy, modify, and distribute this * Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without * software and its documentation for any purpose and without
@ -100,9 +100,9 @@ void ares_free_data(void *dataptr)
free(ptr->data.naptr_reply.flags); free(ptr->data.naptr_reply.flags);
if (ptr->data.naptr_reply.service) if (ptr->data.naptr_reply.service)
free(ptr->data.naptr_reply.service); free(ptr->data.naptr_reply.service);
if (ptr->data.naptr_reply.regexp); if (ptr->data.naptr_reply.regexp)
free(ptr->data.naptr_reply.regexp); free(ptr->data.naptr_reply.regexp);
if (ptr->data.naptr_reply.replacement); if (ptr->data.naptr_reply.replacement)
free(ptr->data.naptr_reply.replacement); free(ptr->data.naptr_reply.replacement);
break; break;
@ -152,7 +152,7 @@ void *ares_malloc_data(ares_datatype type)
case ARES_DATATYPE_TXT_REPLY: case ARES_DATATYPE_TXT_REPLY:
ptr->data.txt_reply.next = NULL; ptr->data.txt_reply.next = NULL;
ptr->data.txt_reply.txt = NULL; ptr->data.txt_reply.txt = NULL;
ptr->data.txt_reply.length = 0; ptr->data.txt_reply.length = 0;
break; break;
case ARES_DATATYPE_ADDR_NODE: case ARES_DATATYPE_ADDR_NODE:
@ -165,7 +165,7 @@ void *ares_malloc_data(ares_datatype type)
case ARES_DATATYPE_NAPTR_REPLY: case ARES_DATATYPE_NAPTR_REPLY:
ptr->data.naptr_reply.next = NULL; ptr->data.naptr_reply.next = NULL;
ptr->data.naptr_reply.flags = NULL; ptr->data.naptr_reply.flags = NULL;
ptr->data.naptr_reply.service; ptr->data.naptr_reply.service = NULL;
ptr->data.naptr_reply.regexp = NULL; ptr->data.naptr_reply.regexp = NULL;
ptr->data.naptr_reply.replacement = NULL; ptr->data.naptr_reply.replacement = NULL;
ptr->data.naptr_reply.order = 0; ptr->data.naptr_reply.order = 0;

Loading…
Cancel
Save