summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2012-12-19 12:04:48 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-12-19 18:18:14 +0100
commit47c676a3ae558b87837955cf1a801c7b434d748e (patch)
tree3de4b05c456cc075da9dfa8b3e3a6068716d0b2c
parente850be1ff2e13bba9812c94c3d102c0a0b570820 (diff)
downloadsssd-47c676a3ae558b87837955cf1a801c7b434d748e.tar.gz
sssd-47c676a3ae558b87837955cf1a801c7b434d748e.tar.bz2
sssd-47c676a3ae558b87837955cf1a801c7b434d748e.zip
use talloc_zfree when freeing rhostent in resolver
We should use talloc_zfree() when freeing state variables, so we can later avoid undesirable access after free.
-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 268d266a..04651511 100644
--- a/src/resolv/async_resolv.c
+++ b/src/resolv/async_resolv.c
@@ -1051,7 +1051,7 @@ resolv_gethostbyname_dns_parse(struct gethostbyname_dns_state *state,
* c-ares, but we need to handle it gracefully.
*/
if (state->rhostent->addr_list == NULL) {
- talloc_free(state->rhostent);
+ talloc_zfree(state->rhostent);
return ENOENT;
}
}