com php-src: Fix mem leak in PHP7: ext/oci8/oci8.c ext/oci8/t ests/bind_sqltnum.phpt
| From: | Christopher Jones | Date: | Mon, 14 Sep 2015 03:29:09 +0000 |
| Subject: | com php-src: Fix mem leak in PHP7: ext/oci8/oci8.c ext/oci8/t ests/bind_sqltnum.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89013@lists.php.net to get a copy of this message | ||
Commit: 145708b658d0a60b738dde1a942dea9032f2f54e
Author: Christopher Jones <christopher.jones@oracle.com> Mon, 14 Sep 2015 13:29:09
+1000
Parents: 3c2d6f7f4002b666740b1eba2d45f866f36d6dda
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=145708b658d0a60b738dde1a942dea9032f2f54e
Log:
Fix mem leak in PHP7
Changed paths:
M ext/oci8/oci8.c
M ext/oci8/tests/bind_sqltnum.phpt
Diff:
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 9144d48..01b2414 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -2748,6 +2748,7 @@ void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int
expected_arg
placeholder = Z_REFVAL_P(array);
else
placeholder = array;
+ zval_dtor(placeholder);
} else {
placeholder = return_value;
}
diff --git a/ext/oci8/tests/bind_sqltnum.phpt b/ext/oci8/tests/bind_sqltnum..phpt
index 93fc480..3d29aeb 100644
--- a/ext/oci8/tests/bind_sqltnum.phpt
+++ b/ext/oci8/tests/bind_sqltnum.phpt
@@ -3,6 +3,10 @@ Bind with SQLT_NUM
--SKIPIF--
<?php
if (!extension_loaded('oci8')) die("skip no oci8 extension");
+preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
+if (!(isset($matches[0]) && $matches[0] >= 12)) {
+ die("skip works only with Oracle 12c or greater version of Oracle client libraries");
+}
?>
--FILE--
<?php
@@ -215,7 +219,7 @@ array(1) {
["NUMBER_T"]=>
array(1) {
[0]=>
- string(127)
"-000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
+ string(2) "-~"
}
}