summaryrefslogtreecommitdiff
path: root/ext/oci8
diff options
context:
space:
mode:
authorChristopher Jones <sixd@php.net>2020-08-22 11:37:23 +1000
committerChristopher Jones <sixd@php.net>2020-08-22 11:37:23 +1000
commit47c787ff5b80764b59dead181633ec45dbd2d70c (patch)
tree483a3d0f2f1889efce61d830895c83b7c1a2ec07 /ext/oci8
parentf32653accc0fc2401aca91f9590272b8d95ef426 (diff)
downloadphp-git-47c787ff5b80764b59dead181633ec45dbd2d70c.tar.gz
Squash a Linux compile warning
Diffstat (limited to 'ext/oci8')
-rw-r--r--ext/oci8/oci8.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index b83ec33f04..f9e65939a5 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -917,7 +917,7 @@ void php_oci_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent, int exclus
php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char *password, int password_len, char *new_password, int new_password_len, char *dbname, int dbname_len, char *charset, zend_long session_mode, int persistent, int exclusive)
{
zval *zvp;
- zend_resource *le;
+ zend_resource *le = NULL;
zend_resource new_le;
php_oci_connection *connection = NULL;
smart_str hashed_details = {0};
@@ -1163,7 +1163,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
/* We have to do a hash_del but need to preserve the resource if there is a positive
* refcount. Set the data pointer in the list entry to NULL
*/
- if (connection == connection->id->ptr) {
+ if (connection == connection->id->ptr && le) {
le->ptr = NULL;
}