summaryrefslogtreecommitdiff
path: root/ext/oci8
diff options
context:
space:
mode:
authorKoenigsKind <github@koenigskind.net>2018-09-04 14:19:04 +0200
committerChristopher Jones <christopher.jones@oracle.com>2018-12-08 18:49:12 +1100
commit3c91851874f64061f5054f710cf145a53f55757f (patch)
treef107fbaa9d0a9aed7b7d6f446724637cda12cf14 /ext/oci8
parente3946534a47afc6678eccaf5217632221ed297df (diff)
downloadphp-git-3c91851874f64061f5054f710cf145a53f55757f.tar.gz
When releasing an oci8 connection always set the resource to null.
Diffstat (limited to 'ext/oci8')
-rw-r--r--ext/oci8/oci8.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 9e559b783a..b87fd72ceb 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -2351,7 +2351,6 @@ int php_oci_connection_release(php_oci_connection *connection)
connection->svc = NULL;
connection->server = NULL;
connection->session = NULL;
- connection->id = NULL;
connection->is_attached = connection->is_open = connection->rb_on_disconnect = connection->used_this_request = 0;
connection->is_stub = 1;
@@ -2368,6 +2367,9 @@ int php_oci_connection_release(php_oci_connection *connection)
#endif /* HAVE_OCI8_DTRACE */
}
+ /* Always set id to null, so next time a new resource is being registered. */
+ connection->id = NULL;
+
OCI_G(in_call) = in_call_save;
return result;
}