summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-10-27 10:12:56 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-10-31 08:03:28 -0400
commit8db778c4a34b38224712bec0701303550781dcd5 (patch)
tree6414920764bc1e58379a206c50a6614d71d29911
parent71829db25d6a0beb63066d912702ac1b7787dbe2 (diff)
downloadsssd-8db778c4a34b38224712bec0701303550781dcd5.tar.gz
sssd-8db778c4a34b38224712bec0701303550781dcd5.tar.bz2
sssd-8db778c4a34b38224712bec0701303550781dcd5.zip
resolver: Free the whole hostent structure
We would only free the hostent structure itself, not its contents. Use a wrapper provided by c-ares to do so.
-rw-r--r--src/resolv/async_resolv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolv/async_resolv.c b/src/resolv/async_resolv.c
index 936fd802..7b7ca41e 100644
--- a/src/resolv/async_resolv.c
+++ b/src/resolv/async_resolv.c
@@ -927,7 +927,7 @@ resolv_gethostbyname_dns_parse(struct gethostbyname_dns_state *state,
state->rhostent = resolv_copy_hostent_ares(state, hostent,
state->family,
addr, naddrttls);
- free(hostent);
+ ares_free_hostent(hostent);
if (state->rhostent == NULL) {
ret = ENOMEM;
goto fail;