abies           Wed Aug 13 09:27:36 2003 EDT

  Modified files:              (Branch: PHP_4_3)
    /php-src/ext/interbase      interbase.c php_interbase.h 
  Log:
  Fixed crash in _php_ibase_error() after request shutdown (also fixes #7014)
  
  
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.91.2.14 
php-src/ext/interbase/interbase.c:1.91.2.15
--- php-src/ext/interbase/interbase.c:1.91.2.14 Tue Aug 12 21:28:32 2003
+++ php-src/ext/interbase/interbase.c   Wed Aug 13 09:27:36 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: interbase.c,v 1.91.2.14 2003/08/13 01:28:32 abies Exp $ */
+/* $Id: interbase.c,v 1.91.2.15 2003/08/13 13:27:36 abies Exp $ */
 
 
 /* TODO: Arrays, roles?
@@ -531,7 +531,6 @@
        ibase_globals->timestampformat = NULL;
        ibase_globals->dateformat = NULL;
        ibase_globals->timeformat = NULL;
-       ibase_globals->errmsg = NULL;
        ibase_globals->num_persistent = 0;
 }
 
@@ -588,10 +587,7 @@
        }
        IBG(timeformat) = DL_STRDUP(IBG(cfg_timeformat));
 
-       if (IBG(errmsg)) {
-               DL_FREE(IBG(errmsg));
-       }
-       IBG(errmsg) = DL_MALLOC(sizeof(char)*MAX_ERRMSG+1);
+       RESET_ERRMSG;
 
        return SUCCESS;
 }
@@ -619,11 +615,6 @@
        }
        IBG(timeformat) = NULL;
 
-       if (IBG(errmsg)) {
-               DL_FREE(IBG(errmsg));
-       }
-       IBG(errmsg) = NULL;
-
        return SUCCESS;
 } 
  
@@ -633,7 +624,7 @@
 
        php_info_print_table_start();
        php_info_print_table_row(2, "Interbase Support", "enabled");
-       php_info_print_table_row(2, "Revision", "$Revision: 1.91.2.14 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.91.2.15 $");
 #ifdef COMPILE_DL_INTERBASE
        php_info_print_table_row(2, "Dynamic Module", "yes");
 #endif
Index: php-src/ext/interbase/php_interbase.h
diff -u php-src/ext/interbase/php_interbase.h:1.28.2.6 
php-src/ext/interbase/php_interbase.h:1.28.2.7
--- php-src/ext/interbase/php_interbase.h:1.28.2.6      Wed Jul 23 22:47:10 2003
+++ php-src/ext/interbase/php_interbase.h       Wed Aug 13 09:27:36 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_interbase.h,v 1.28.2.6 2003/07/24 02:47:10 sniper Exp $ */
+/* $Id: php_interbase.h,v 1.28.2.7 2003/08/13 13:27:36 abies Exp $ */
 
 #ifndef PHP_INTERBASE_H
 #define PHP_INTERBASE_H
@@ -102,7 +102,7 @@
        char *cfg_dateformat;
        char *timeformat;
        char *cfg_timeformat;
-       char *errmsg;
+       char errmsg[MAX_ERRMSG];
 ZEND_END_MODULE_GLOBALS(ibase)
 
 typedef struct {



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

Reply via email to