ext/sockets: multicast simplification on ipv4 table retrieval and buffer handling. (#14542)

This commit is contained in:
David CARLIER 2024-06-12 18:33:16 +01:00 committed by GitHub
parent 25360ef249
commit 18cfd94de4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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) {