]> granicus.if.org Git - php/commitdiff
fix win32 warning and ming leak
authorWez Furlong <wez@php.net>
Sun, 17 Mar 2002 01:58:42 +0000 (01:58 +0000)
committerWez Furlong <wez@php.net>
Sun, 17 Mar 2002 01:58:42 +0000 (01:58 +0000)
ext/ming/ming.c
ext/standard/fsock.c

index 41e341de4a7649939a393d45af3a9925ec205702..7233e3e4d24f838cc34280cb1e244fc1adb82a01 100644 (file)
@@ -1610,6 +1610,8 @@ PHP_FUNCTION(swfmovie_save)
   retval = SWFMovie_output(getMovie(getThis() TSRMLS_CC),
                              &phpStreamOutputMethod, (void *)stream);
 
+  php_stream_close(stream);
+  
   RETURN_LONG(retval);
 }
 
index 2d1b4be05aabb66361bf715d1bd83fa6a15e5025..ce9da8d34b374f21d392571783f17f68ca416ceb 100644 (file)
@@ -161,7 +161,7 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
 
        if (port > 0)   { /* connect to a host */
                enum php_sslflags_t { php_ssl_none, php_ssl_v23, php_ssl_tls };
-               enum php_sslflags_t ssl_flags;
+               enum php_sslflags_t ssl_flags = php_ssl_none;
                struct {
                        char *proto;
                        int protolen;
@@ -193,7 +193,7 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
                }
                else
 #endif
-               stream = php_stream_sock_open_host(host, port, socktype, (int)timeout, persistent);
+               stream = php_stream_sock_open_host(host, (unsigned short)port, socktype, (int)timeout, persistent);
 
                if (stream == NULL) {
                        zend_error(E_WARNING, "%s(): unable to connect to %s:%d",