Skip to content

Commit de9f64f

Browse files
committed
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: When releasing an oci8 connection always set the resource to null.
2 parents 49944e4 + 3c91851 commit de9f64f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ext/oci8/oci8.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2351,7 +2351,6 @@ int php_oci_connection_release(php_oci_connection *connection)
23512351
connection->svc = NULL;
23522352
connection->server = NULL;
23532353
connection->session = NULL;
2354-
connection->id = NULL;
23552354

23562355
connection->is_attached = connection->is_open = connection->rb_on_disconnect = connection->used_this_request = 0;
23572356
connection->is_stub = 1;
@@ -2368,6 +2367,9 @@ int php_oci_connection_release(php_oci_connection *connection)
23682367
#endif /* HAVE_OCI8_DTRACE */
23692368
}
23702369

2370+
/* Always set id to null, so next time a new resource is being registered. */
2371+
connection->id = NULL;
2372+
23712373
OCI_G(in_call) = in_call_save;
23722374
return result;
23732375
}

0 commit comments

Comments
 (0)