Use the correct freeing function

This commit is contained in:
Thomas Punt 2018-01-29 11:13:10 +00:00
parent a882f95e39
commit fb128f6512

View File

@ -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;
}