]> granicus.if.org Git - php/commitdiff
MFH:
authorAntony Dovgal <tony2001@php.net>
Mon, 13 Jun 2005 09:31:03 +0000 (09:31 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 13 Jun 2005 09:31:03 +0000 (09:31 +0000)
destroy session after destroying error handle
SQLT_CHR is allowed too

ext/oci8/oci8.c

index 4fdc6404243d135820cd24664f1066a7a709bb20..9169a53a19c4a63abb83f416e823685eef98ce15 100644 (file)
@@ -1016,6 +1016,15 @@ static void _oci_conn_list_dtor(oci_connection *connection TSRMLS_DC)
                );
        }
 
+       if (connection->pError) {
+               CALL_OCI(
+                       OCIHandleFree(
+                               (dvoid *) connection->pError, 
+                               (ub4) OCI_HTYPE_ERROR
+                       )
+               );
+       }
+
        if (connection->session && connection->session->exclusive) {
                /* close associated session when destructed */
                zend_list_delete(connection->session->num);
@@ -1026,15 +1035,6 @@ static void _oci_conn_list_dtor(oci_connection *connection TSRMLS_DC)
                efree(connection->descriptors);
        }
 
-       if (connection->pError) {
-               CALL_OCI(
-                       OCIHandleFree(
-                               (dvoid *) connection->pError, 
-                               (ub4) OCI_HTYPE_ERROR
-                       )
-               );
-       }
-
        oci_debug("END   _oci_conn_list_dtor: id=%d",connection->id);
 
        efree(connection);
@@ -3695,6 +3695,8 @@ break;
                        }
                        value_sz = sizeof(void*);
                        break;
+               case SQLT_CHR:
+                       break;
                default:
                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown or unsupported datatype given: %u", ocitype);
                        RETURN_FALSE;