ARES\_FREE\_DATA(3) Library Functions Manual ARES\_FREE\_DATA(3)

# [NAME](#NAME)

ares\_free\_data - Free data allocated by several c-ares functions

# [SYNOPSIS](#SYNOPSIS)

```
#include <ares.h>
void ares_free_data(void *dataptr)
```

# [DESCRIPTION](#DESCRIPTION)

The [**ares\_free\_data(3)**](/man/os/c-ares/ares_free_data.3) function frees one or more data structures allocated and returned by several c-ares functions. Specifically the data returned by the following list of functions must be deallocated using this function.

[**ares\_get\_servers(3)**](#ares_get_servers%283%29)

When used to free the data returned by [*ares\_get\_servers(3)*](/man/os/c-ares/ares_get_servers.3) this will free the whole linked list of ares\_addr\_node structures returned by [*ares\_get\_servers(3)*](/man/os/c-ares/ares_get_servers.3).

[**ares\_parse\_srv\_reply(3)**](#ares_parse_srv_reply%283%29)

When used to free the data returned by [*ares\_parse\_srv\_reply(3)*](/man/os/c-ares/ares_parse_srv_reply.3) this will free the whole linked list of ares\_srv\_reply structures returned by [*ares\_parse\_srv\_reply(3)*](/man/os/c-ares/ares_parse_srv_reply.3), along with any additional storage associated with those structures.

[**ares\_parse\_mx\_reply(3)**](#ares_parse_mx_reply%283%29)

When used to free the data returned by [*ares\_parse\_mx\_reply(3)*](/man/os/c-ares/ares_parse_mx_reply.3) this will free the whole linked list of ares\_mx\_reply structures returned by [*ares\_parse\_mx\_reply(3)*](/man/os/c-ares/ares_parse_mx_reply.3), along with any additional storage associated with those structures.

[**ares\_parse\_txt\_reply(3)**](#ares_parse_txt_reply%283%29)

When used to free the data returned by [*ares\_parse\_txt\_reply(3)*](/man/os/c-ares/ares_parse_txt_reply.3) this will free the whole linked list of ares\_txt\_reply structures returned by [*ares\_parse\_txt\_reply(3)*](/man/os/c-ares/ares_parse_txt_reply.3), along with any additional storage associated with those structures.

[**ares\_parse\_soa\_reply(3)**](#ares_parse_soa_reply%283%29)

When used to free the data returned by [*ares\_parse\_soa\_reply(3)*](/man/os/c-ares/ares_parse_soa_reply.3) this will free the ares\_soa\_reply structure, along with any additional storage associated with those structure. [**ares\_parse\_uri\_reply(3)**](/man/os/c-ares/ares_parse_uri_reply.3) When used to free the data returned by [*ares\_parse\_uri\_reply(3)*](/man/os/c-ares/ares_parse_uri_reply.3) this will free list of ares\_uri\_reply structures, along with any additional storage associated with those structure.

# [RETURN VALUE](#RETURN_VALUE)

The [*ares\_free\_data(3)*](/man/os/c-ares/ares_free_data.3) function does not return a value.

# [AVAILABILITY](#AVAILABILITY)

This function was first introduced in c-ares version 1.7.0.

# [SEE ALSO](#SEE_ALSO)

[**ares\_get\_servers**(3)](/man/os/c-ares/ares_get_servers.3), [**ares\_parse\_srv\_reply**(3)](/man/os/c-ares/ares_parse_srv_reply.3), [**ares\_parse\_mx\_reply**(3)](/man/os/c-ares/ares_parse_mx_reply.3), [**ares\_parse\_txt\_reply**(3)](/man/os/c-ares/ares_parse_txt_reply.3), [**ares\_parse\_soa\_reply**(3)](/man/os/c-ares/ares_parse_soa_reply.3)

5 March 2010

---

Document: ares_free_data(3) from c-ares 1.34.8-r2 (Chainguard OS)
Source: https://github.com/c-ares/c-ares
