mirror of
https://github.com/php/php-src.git
synced 2026-04-14 11:32:11 +02:00
Added some missing zval_dtor calls in php_fsockopen()
This commit is contained in:
@@ -313,10 +313,13 @@ static void php_fsockopen(INTERNAL_FUNCTION_PARAMETERS, int persistent) {
|
||||
|
||||
if (connect_nonb(socketd, (struct sockaddr *) &unix_addr, sizeof(unix_addr), &timeout) == SOCK_CONN_ERR) {
|
||||
CLOSE_SOCK(1);
|
||||
if(arg_count>2) (*args[2])->value.lval = errno;
|
||||
if(arg_count>2) {
|
||||
zval_dtor(*args[2]);
|
||||
ZVAL_LONG(*args[2],errno);
|
||||
}
|
||||
if(arg_count>3) {
|
||||
(*args[3])->value.str.val = estrdup(strerror(errno));
|
||||
(*args[3])->value.str.len = strlen((*args[3])->value.str.val);
|
||||
zval_dtor(*args[3]);
|
||||
ZVAL_STRING(*args[3],strerror(errno),1);
|
||||
}
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user