mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Use the correct freeing function
This commit is contained in:
parent
a882f95e39
commit
fb128f6512
@ -1619,7 +1619,7 @@ PHP_FUNCTION(socket_recv)
|
||||
recv_buf = zend_string_alloc(len, 0);
|
||||
|
||||
if ((retval = recv(php_sock->bsd_socket, ZSTR_VAL(recv_buf), len, flags)) < 1) {
|
||||
efree(recv_buf);
|
||||
zend_string_free(recv_buf);
|
||||
|
||||
zval_dtor(buf);
|
||||
ZVAL_NULL(buf);
|
||||
@ -1761,7 +1761,7 @@ PHP_FUNCTION(socket_recvfrom)
|
||||
sin6.sin6_family = AF_INET6;
|
||||
|
||||
if (arg6 == NULL) {
|
||||
efree(recv_buf);
|
||||
zend_string_free(recv_buf);
|
||||
WRONG_PARAM_COUNT;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user