From 37660581d110cafde400c5c91d660fe9082aa7bf Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Dec 18 2012 10:54:26 +0000 Subject: RESOLV: Do not steal the resulting hostent on error https://fedorahosted.org/sssd/ticket/1706 --- diff --git a/src/resolv/async_resolv.c b/src/resolv/async_resolv.c index 00aed14..268d266 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; }