mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
ext/sockets: multicast simplification on ipv4 table retrieval and buffer handling. (#14542)
This commit is contained in:
parent
25360ef249
commit
18cfd94de4
1 changed files with 6 additions and 8 deletions
|
@ -635,8 +635,7 @@ zend_result php_if_index_to_addr4(unsigned if_index, php_socket *php_sock, struc
|
|||
retry:
|
||||
retval = GetIpAddrTable(addr_table, &size, 0);
|
||||
if (retval == ERROR_INSUFFICIENT_BUFFER) {
|
||||
efree(addr_table);
|
||||
addr_table = emalloc(size);
|
||||
erealloc(addr_table, size);
|
||||
goto retry;
|
||||
}
|
||||
if (retval != NO_ERROR) {
|
||||
|
@ -678,8 +677,7 @@ zend_result php_add4_to_if_index(struct in_addr *addr, php_socket *php_sock, uns
|
|||
retry:
|
||||
retval = GetIpAddrTable(addr_table, &size, 0);
|
||||
if (retval == ERROR_INSUFFICIENT_BUFFER) {
|
||||
efree(addr_table);
|
||||
addr_table = emalloc(size);
|
||||
erealloc(addr_table, size);
|
||||
goto retry;
|
||||
}
|
||||
if (retval != NO_ERROR) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue