sixd Fri Feb 15 23:05:19 2008 UTC
Added files: (Branch: PHP_5_2)
/php-src/ext/oci8/tests bug44113.phpt
Modified files:
/php-src/ext/oci8 oci8_collection.c
Log:
Bug #44113 (New collection creation can fail with OCI-22303)
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/oci8_collection.c?r1=1.5.2.3.2.8&r2=1.5.2.3.2.9&diff_format=u
Index: php-src/ext/oci8/oci8_collection.c
diff -u php-src/ext/oci8/oci8_collection.c:1.5.2.3.2.8
php-src/ext/oci8/oci8_collection.c:1.5.2.3.2.9
--- php-src/ext/oci8/oci8_collection.c:1.5.2.3.2.8 Mon Dec 31 07:20:09 2007
+++ php-src/ext/oci8/oci8_collection.c Fri Feb 15 23:05:19 2008
@@ -25,7 +25,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8_collection.c,v 1.5.2.3.2.8 2007/12/31 07:20:09 sebastian Exp $ */
+/* $Id: oci8_collection.c,v 1.5.2.3.2.9 2008/02/15 23:05:19 sixd Exp $ */
@@ -44,9 +44,9 @@
/* {{{ php_oci_collection_create()
Create and return connection handle */
-php_oci_collection * php_oci_collection_create(php_oci_connection* connection,
char *tdo, int tdo_len, char *schema, int schema_len TSRMLS_DC)
+php_oci_collection * php_oci_collection_create(php_oci_connection *connection,
char *tdo, int tdo_len, char *schema, int schema_len TSRMLS_DC)
{
- dvoid *dschp1;
+ dvoid *dschp1 = NULL;
dvoid *parmp1;
dvoid *parmp2;
php_oci_collection *collection;
@@ -219,11 +219,17 @@
goto CLEANUP;
}
+ /* free the describe handle (Bug #44113) */
+ PHP_OCI_CALL(OCIHandleFree, ((dvoid *) dschp1, OCI_HTYPE_DESCRIBE));
PHP_OCI_REGISTER_RESOURCE(collection, le_collection);
return collection;
CLEANUP:
+ if (dschp1) {
+ /* free the describe handle (Bug #44113) */
+ PHP_OCI_CALL(OCIHandleFree, ((dvoid *) dschp1,
OCI_HTYPE_DESCRIBE));
+ }
php_oci_error(connection->err, connection->errcode TSRMLS_CC);
php_oci_collection_close(collection TSRMLS_CC);
return NULL;
http://cvs.php.net/viewvc.cgi/php-src/ext/oci8/tests/bug44113.phpt?view=markup&rev=1.1
Index: php-src/ext/oci8/tests/bug44113.phpt
+++ php-src/ext/oci8/tests/bug44113.phpt
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php