iliaa           Wed Jan 28 21:55:34 2004 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src    NEWS 
    /php-src/ext/pgsql  pgsql.c 
  Log:
  MFH: Fixed bug #27007 (missing connection closure when connect fails in 
  pgsql)
  
  
http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.549&r2=1.1247.2.550&ty=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.1247.2.549 php-src/NEWS:1.1247.2.550
--- php-src/NEWS:1.1247.2.549   Wed Jan 28 21:18:16 2004
+++ php-src/NEWS        Wed Jan 28 21:55:33 2004
@@ -16,6 +16,8 @@
 - Fixed bug #27037 (fixed possible crash in apache2handler output code). (Ilia)
 - Fixed bug #27011 (64bit int/long confusion in preg_match*() functions).
   (Ilia)
+- Fixed bug #27007 (missing connection closure when connect fails in pgsql).
+  (Ilia)
 - Fixed bug #26974 (rename() doesn't check the destination file against 
   safe_mode/open_basedir). (Ilia)
 - Fixed bug #26973 (*printf() '+' modifier broken). (Jani)
http://cvs.php.net/diff.php/php-src/ext/pgsql/pgsql.c?r1=1.244.2.32&r2=1.244.2.33&ty=u
Index: php-src/ext/pgsql/pgsql.c
diff -u php-src/ext/pgsql/pgsql.c:1.244.2.32 php-src/ext/pgsql/pgsql.c:1.244.2.33
--- php-src/ext/pgsql/pgsql.c:1.244.2.32        Sun Jan 11 16:18:29 2004
+++ php-src/ext/pgsql/pgsql.c   Wed Jan 28 21:55:33 2004
@@ -19,7 +19,7 @@
    +----------------------------------------------------------------------+
  */
  
-/* $Id: pgsql.c,v 1.244.2.32 2004/01/11 21:18:29 iliaa Exp $ */
+/* $Id: pgsql.c,v 1.244.2.33 2004/01/29 02:55:33 iliaa Exp $ */
 
 #include <stdlib.h>
 
@@ -671,6 +671,9 @@
                }
                if (pgsql==NULL || PQstatus(pgsql)==CONNECTION_BAD) {
                        PHP_PQ_ERROR("Unable to connect to PostgreSQL server: %s", 
pgsql);
+                       if (pgsql) {
+                               PQfinish(pgsql);
+                       }
                        goto err;
                }
 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to