]> granicus.if.org Git - php/commitdiff
- Fix crashbug on dtor
authorDerick Rethans <derick@php.net>
Wed, 14 Nov 2001 09:48:14 +0000 (09:48 +0000)
committerDerick Rethans <derick@php.net>
Wed, 14 Nov 2001 09:48:14 +0000 (09:48 +0000)
ext/standard/fsock.c

index 87ac6bcd2e52b364ff3d92ddacfc0b49c3288722..f4b8e369c9633f8447d68343ff0bc29dc26fa134 100644 (file)
@@ -181,11 +181,11 @@ static void php_fsockopen(INTERNAL_FUNCTION_PARAMETERS, int persistent) {
                timeout.tv_usec = conv % 1000000;
                /* fall-through */
        case 4:
-               zval_ptr_dtor(args[3]);
+               zval_dtor(*args[3]);
                ZVAL_STRING(*args[3], "", 1);
                /* fall-through */
        case 3:
-               zval_ptr_dtor(args[2]);
+               zval_dtor(*args[2]);
                ZVAL_LONG(*args[2], 0);
                break;
        }
@@ -231,11 +231,11 @@ static void php_fsockopen(INTERNAL_FUNCTION_PARAMETERS, int persistent) {
                        CLOSE_SOCK(1);
 
                        if (arg_count>2) {
-                               zval_ptr_dtor(args[2]);
+                               zval_dtor(*args[2]);
                                ZVAL_LONG(*args[2], errno);
                        }
                        if (arg_count>3) {
-                               zval_ptr_dtor(args[3]);
+                               zval_dtor(*args[3]);
                                ZVAL_STRING(*args[3], strerror(errno), 1);
                        }
                        RETURN_FALSE;
@@ -257,11 +257,11 @@ static void php_fsockopen(INTERNAL_FUNCTION_PARAMETERS, int persistent) {
                if (php_connect_nonb(socketd, (struct sockaddr *) &unix_addr, sizeof(unix_addr), &timeout) == SOCK_CONN_ERR) {
                        CLOSE_SOCK(1);
                        if (arg_count>2) {
-                               zval_ptr_dtor(args[2]);
+                               zval_dtor(*args[2]);
                                ZVAL_LONG(*args[2], errno);
                        }
                        if (arg_count>3) {
-                               zval_ptr_dtor(args[3]);
+                               zval_dtor(*args[3]);
                                ZVAL_STRING(*args[3], strerror(errno), 1);
                        }
                        RETURN_FALSE;