com php-src: Fixed valgrind issue: NEWS ext/oci8/oci8_int erface.c ext/oci8/package.xml ext/oci8/tests/driver _name.phpt
| From: | Tianfang Yang | Date: | Mon, 16 Oct 2017 23:16:30 +0000 |
| Subject: | com php-src: Fixed valgrind issue: NEWS ext/oci8/oci8_int erface.c ext/oci8/package.xml ext/oci8/tests/driver _name.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-99770@lists.php.net to get a copy of this message | ||
Commit: aad4544e9520fd3ca045bcbc885ddcdc816fd35e
Author: Tianfang Yang <tianfyan@php.net> Mon, 16 Oct 2017 19:16:30 -0400
Parents: 7778106f4039020879c5ef1e557d4bd57f879321
Branches: PHP-7.0 PHP-7.1 PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=aad4544e9520fd3ca045bcbc885ddcdc816fd35e
Log:
Fixed valgrind issue
Changed paths:
M NEWS
M ext/oci8/oci8_interface.c
M ext/oci8/package.xml
M ext/oci8/tests/driver_name.phpt
Diff:
diff --git a/NEWS b/NEWS
index 00749e9..8d451c6 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,9 @@ PHP NEWS
. Fixed bug #75301 (Exif extension has built in revision version). (Peter
Kokot)
+- OCI8:
+ . Fixed valgrind issue. (Tianfang Yang)
+
- OpenSSL:
. Fixed bug #75363 (openssl_x509_parse leaks memory). (Bob, Jakub Zelenka)
diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c
index 5dabefc..7b9b79f 100644
--- a/ext/oci8/oci8_interface.c
+++ b/ext/oci8/oci8_interface.c
@@ -1611,14 +1611,15 @@ PHP_FUNCTION(oci_close)
}
PHP_OCI_ZVAL_TO_CONNECTION(z_connection, connection);
- if (GC_REFCOUNT(connection->id) == 2) /* CHANGED VERSION::PHP7
- Changed the refCount to 2 since
- internally Zend engine increments
- RefCount value by 1 */
+ if (GC_REFCOUNT(connection->id) == 2) { /* CHANGED VERSION::PHP7
+ Changed the refCount to 2 since
+ internally Zend engine increments
+ RefCount value by 1 */
+ /* Unregister Oracle TAF */
+ php_oci_unregister_taf_callback(connection);
+
zend_list_close(connection->id);
-
- /* Unregister Oracle TAF */
- php_oci_unregister_taf_callback(connection);
+ }
/* ZVAL_NULL(z_connection); */
diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml
index 763d8c9..45e6eb5 100644
--- a/ext/oci8/package.xml
+++ b/ext/oci8/package.xml
@@ -56,8 +56,8 @@ Interoperability Support" (ID 207303.1) for details.
<time>12:00:00</time>
<version>
- <release>2.1.7</release>
- <api>2.1.7</api>
+ <release>2.1.8</release>
+ <api>2.1.8</api>
</version>
<stability>
<release>stable</release>
@@ -66,7 +66,7 @@ Interoperability Support" (ID 207303.1) for details.
<license uri="http://www.php.net/license">PHP</license>
<notes>
This version is for PHP 7 only.
-Added oci_unregister_taf_callback()
+Fixed reference counting and memory issues. (Dmitry, Tianfang)
</notes>
<contents>
<dir name="/">
@@ -478,6 +478,22 @@ Added oci_unregister_taf_callback()
<release>
<version>
+ <release>2.1.7</release>
+ <api>2.1.7</api>
+ </version>
+ <stability>
+ <release>stable</release>
+ <api>stable</api>
+ </stability>
+ <license uri="http://www.php.net/license">PHP</license>
+ <notes>
+This version is for PHP 7 only.
+Added oci_unregister_taf_callback()
+ </notes>
+</release>
+
+<release>
+ <version>
<release>2.1.6</release>
<api>2.1.6</api>
</version>
diff --git a/ext/oci8/tests/driver_name.phpt b/ext/oci8/tests/driver_name.phpt
index 1ea885b..a5be162 100644
--- a/ext/oci8/tests/driver_name.phpt
+++ b/ext/oci8/tests/driver_name.phpt
@@ -57,11 +57,11 @@ function get_attr($conn)
?>
--EXPECT--
**Test 1.1 - Default values for the attribute **************
-The value of DRIVER_NAME is PHP OCI8 : 2.1.7
+The value of DRIVER_NAME is PHP OCI8 : 2.1.8
***Test 1.2 - Get the values from different connections **************
Testing with oci_pconnect()
-The value of DRIVER_NAME is PHP OCI8 : 2.1.7
+The value of DRIVER_NAME is PHP OCI8 : 2.1.8
Testing with oci_new_connect()
-The value of DRIVER_NAME is PHP OCI8 : 2.1.7
+The value of DRIVER_NAME is PHP OCI8 : 2.1.8
Done