mirror of
https://github.com/php/php-src.git
synced 2024-11-29 04:46:07 +08:00
New function dns_get_record(): close resolver socket after use.
fix to internal func php_parserr(): correct bug in return state.
This commit is contained in:
parent
318e561905
commit
e9047df607
@ -331,8 +331,9 @@ static u_char *php_parserr(u_char *cp, querybuf *answer, int type_to_fetch, int
|
|||||||
GETLONG(ttl, cp);
|
GETLONG(ttl, cp);
|
||||||
GETSHORT(dlen, cp);
|
GETSHORT(dlen, cp);
|
||||||
if (type_to_fetch != T_ANY && type != type_to_fetch) {
|
if (type_to_fetch != T_ANY && type != type_to_fetch) {
|
||||||
/* Should never actually occour */
|
*subarray = NULL;
|
||||||
return NULL;
|
cp += dlen;
|
||||||
|
return cp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!store) {
|
if (!store) {
|
||||||
@ -576,6 +577,7 @@ PHP_FUNCTION(dns_get_record)
|
|||||||
zend_hash_next_index_insert(HASH_OF(return_value), (void *)&subarray[current_subarray], sizeof(zval *), NULL);
|
zend_hash_next_index_insert(HASH_OF(return_value), (void *)&subarray[current_subarray], sizeof(zval *), NULL);
|
||||||
current_subarray++;
|
current_subarray++;
|
||||||
}
|
}
|
||||||
|
res_nclose(&res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user