Skip to content

Commit 47c787f

Browse files
committed
Squash a Linux compile warning
1 parent f32653a commit 47c787f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/oci8/oci8.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ void php_oci_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent, int exclus
917917
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)
918918
{
919919
zval *zvp;
920-
zend_resource *le;
920+
zend_resource *le = NULL;
921921
zend_resource new_le;
922922
php_oci_connection *connection = NULL;
923923
smart_str hashed_details = {0};
@@ -1163,7 +1163,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
11631163
/* We have to do a hash_del but need to preserve the resource if there is a positive
11641164
* refcount. Set the data pointer in the list entry to NULL
11651165
*/
1166-
if (connection == connection->id->ptr) {
1166+
if (connection == connection->id->ptr && le) {
11671167
le->ptr = NULL;
11681168
}
11691169

0 commit comments

Comments
 (0)