diff options
Diffstat (limited to 'src/nss-resolve')
-rw-r--r-- | src/nss-resolve/nss-resolve.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/nss-resolve/nss-resolve.c b/src/nss-resolve/nss-resolve.c index b2cb19a7b4..555800c10a 100644 --- a/src/nss-resolve/nss-resolve.c +++ b/src/nss-resolve/nss-resolve.c @@ -281,6 +281,11 @@ enum nss_status _nss_resolve_gethostbyname4_r( if (ttlp) *ttlp = 0; + /* Explicitly reset all error variables */ + *errnop = 0; + *h_errnop = NETDB_SUCCESS; + h_errno = 0; + return NSS_STATUS_SUCCESS; fail: @@ -482,6 +487,11 @@ enum nss_status _nss_resolve_gethostbyname3_r( result->h_length = alen; result->h_addr_list = (char**) r_addr_list; + /* Explicitly reset all error variables */ + *errnop = 0; + *h_errnop = NETDB_SUCCESS; + h_errno = 0; + if (ttlp) *ttlp = 0; @@ -675,6 +685,11 @@ enum nss_status _nss_resolve_gethostbyaddr2_r( if (ttlp) *ttlp = 0; + /* Explicitly reset all error variables */ + *errnop = 0; + *h_errnop = NETDB_SUCCESS; + h_errno = 0; + return NSS_STATUS_SUCCESS; fail: |