cvs: php4 /ext/mssql php_mssql.c
| From: | Frank M. Kromann | Date: | Thu, 31 Aug 2000 19:25:31 +0000 |
| Subject: | cvs: php4 /ext/mssql php_mssql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1474@lists.php.net to get a copy of this message | ||
fmk Thu Aug 31 12:25:31 2000 EDT
Modified files:
/php4/ext/mssql php_mssql.c
Log:
Attemt to fix a lot of bug reports (5582,5614,5633,60,6181,6202) on crashes with php and mssql
server.
Index: php4/ext/mssql/php_mssql.c
diff -u php4/ext/mssql/php_mssql.c:1.25 php4/ext/mssql/php_mssql.c:1.26
--- php4/ext/mssql/php_mssql.c:1.25 Sat Jun 24 08:31:09 2000
+++ php4/ext/mssql/php_mssql.c Thu Aug 31 12:25:31 2000
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_mssql.c,v 1.25 2000/06/24 15:31:09 sas Exp $ */
+/* $Id: php_mssql.c,v 1.26 2000/08/31 19:25:31 fmk Exp $ */
#ifdef COMPILE_DL_MSSQL
#define HAVE_MSSQL 1
@@ -436,6 +436,7 @@
new_le.type = le_plink;
new_le.ptr = mssql_ptr;
if (zend_hash_update(&EG(persistent_list), hashed_details, hashed_details_length + 1,
&new_le, sizeof(list_entry), NULL)==FAILURE) {
+ new_le.refcount++;
efree(mssql_ptr);
efree(hashed_details);
dbfreelogin(mssql.login);
@@ -552,6 +553,7 @@
new_index_ptr.ptr = (void *) return_value->value.lval;
new_index_ptr.type = le_index_ptr;
if (zend_hash_update(&EG(regular_list), hashed_details, hashed_details_length + 1,(void *)
&new_index_ptr, sizeof(list_entry),NULL)==FAILURE) {
+ new_index_ptr.refcount++;
efree(hashed_details);
RETURN_FALSE;
}
@@ -990,6 +992,7 @@
*field_content = result->data[result->cur_row][i];
ZVAL_COPY_CTOR(field_content);
zend_hash_index_update(return_value->value.ht, i, (void *) &field_content, sizeof(zval *),
NULL);
+ field_content->refcount++;
}
result->cur_row++;
}
@@ -1028,7 +1031,9 @@
tmp->value.str.val = php_addslashes(tmp->value.str.val, tmp->value.str.len,
&tmp->value.str.len,1);
}
zend_hash_index_update(return_value->value.ht, i, (void *) &tmp, sizeof(zval *), NULL);
+ tmp->refcount++;
zend_hash_update(return_value->value.ht, result->fields[i].name,
strlen(result->fields[i].name)+1, (void *) &tmp, sizeof(zval *), NULL);
+ tmp->refcount++;
}
result->cur_row++;
}