summaryrefslogtreecommitdiff
path: root/src/resolv
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-12-16 23:31:09 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-12-18 11:42:38 +0100
commit4f945b6b3646fb982cc8e3c41c38059052f2240f (patch)
treec268057f00f923066657f717a7071f1e3fde49ea /src/resolv
parent449fd66aa70c284dd91d51c49363ef9e941dba8d (diff)
downloadsssd-4f945b6b3646fb982cc8e3c41c38059052f2240f.tar.gz
sssd-4f945b6b3646fb982cc8e3c41c38059052f2240f.tar.bz2
sssd-4f945b6b3646fb982cc8e3c41c38059052f2240f.zip
RESOLV: Do not steal the resulting hostent on error
https://fedorahosted.org/sssd/ticket/1706
Diffstat (limited to 'src/resolv')
-rw-r--r--src/resolv/async_resolv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/resolv/async_resolv.c b/src/resolv/async_resolv.c
index 00aed143..268d266a 100644
--- a/src/resolv/async_resolv.c
+++ b/src/resolv/async_resolv.c
@@ -1080,12 +1080,13 @@ resolv_gethostbyname_dns_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
if (timeouts) {
*timeouts = state->timeouts;
}
+
+ TEVENT_REQ_RETURN_ON_ERROR(req);
+
if (rhostent) {
*rhostent = talloc_steal(mem_ctx, state->rhostent);
}
- TEVENT_REQ_RETURN_ON_ERROR(req);
-
return EOK;
}