Skip to content

Commit 145708b

Browse files
committed
Fix mem leak in PHP7
1 parent 3c2d6f7 commit 145708b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

ext/oci8/oci8.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,6 +2748,7 @@ void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_arg
27482748
placeholder = Z_REFVAL_P(array);
27492749
else
27502750
placeholder = array;
2751+
zval_dtor(placeholder);
27512752
} else {
27522753
placeholder = return_value;
27532754
}

ext/oci8/tests/bind_sqltnum.phpt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ Bind with SQLT_NUM
33
--SKIPIF--
44
<?php
55
if (!extension_loaded('oci8')) die("skip no oci8 extension");
6+
preg_match('/^[[:digit:]]+/', oci_client_version(), $matches);
7+
if (!(isset($matches[0]) && $matches[0] >= 12)) {
8+
die("skip works only with Oracle 12c or greater version of Oracle client libraries");
9+
}
610
?>
711
--FILE--
812
<?php
@@ -215,7 +219,7 @@ array(1) {
215219
["NUMBER_T"]=>
216220
array(1) {
217221
[0]=>
218-
string(127) "-000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
222+
string(2) "-~"
219223
}
220224
}
221225

0 commit comments

Comments
 (0)