Merge branch 'PHP-7.2'

* PHP-7.2:
  Use the correct freeing function
This commit is contained in:
Thomas Punt 2018-01-29 11:17:23 +00:00
commit e51aadcc4e

View file

@ -1670,7 +1670,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);
@ -1812,7 +1812,7 @@ PHP_FUNCTION(socket_recvfrom)
sin6.sin6_family = AF_INET6;
if (arg6 == NULL) {
efree(recv_buf);
zend_string_free(recv_buf);
WRONG_PARAM_COUNT;
}