summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2018-01-18 10:53:23 +0800
committerXinchen Hui <laruence@gmail.com>2018-01-18 10:53:23 +0800
commitfb205020ce2dd97d777e09d2debf38a01075d370 (patch)
tree378a9db1ccf9c5d0eff0d49827b58c8728a4d749
parent043d53c7891e7f9437221acaf0fe0fd09a318b41 (diff)
downloadphp-git-fb205020ce2dd97d777e09d2debf38a01075d370.tar.gz
Fixed #75838 (Memory leak in pg_escape_bytea())
-rw-r--r--NEWS3
-rw-r--r--ext/pgsql/pgsql.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 86a51bf188..1af8cffa08 100644
--- a/NEWS
+++ b/NEWS
@@ -2,7 +2,8 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2018, PHP 7.1.15
-
+- PGSQL:
+ . Fixed #75838 (Memory leak in pg_escape_bytea()). (ard_1 at mail dot ru)
01 Feb 2018, PHP 7.1.14
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 2b9e069098..904b9aa3bf 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -4442,6 +4442,7 @@ PHP_FUNCTION(pg_escape_bytea)
to = (char *)PQescapeBytea((unsigned char*)from, from_len, &to_len);
RETVAL_STRINGL(to, to_len-1); /* to_len includes additional '\0' */
+ PQfreemem(to);
}
/* }}} */