From 145708b658d0a60b738dde1a942dea9032f2f54e Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Mon, 14 Sep 2015 13:29:09 +1000 Subject: [PATCH] Fix mem leak in PHP7 --- ext/oci8/oci8.c | 1 + ext/oci8/tests/bind_sqltnum.phpt | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 9144d48baf..01b2414a9e 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 93fc4809ec..3d29aeb4a8 100644 --- a/ext/oci8/tests/bind_sqltnum.phpt +++ b/ext/oci8/tests/bind_sqltnum.phpt @@ -3,6 +3,10 @@ Bind with SQLT_NUM --SKIPIF-- = 12)) { + die("skip works only with Oracle 12c or greater version of Oracle client libraries"); +} ?> --FILE-- array(1) { [0]=> - string(127) "-000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" + string(2) "-~" } } -- 2.40.0