summaryrefslogtreecommitdiff
path: root/ext/pgsql/pgsql.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2018-01-18 10:53:39 +0800
committerXinchen Hui <laruence@gmail.com>2018-01-18 10:53:39 +0800
commit61843012125dbc87916a4665bfed8a26c0413040 (patch)
treec361116f747d0be36ce89e3a28221b54ad9d13c8 /ext/pgsql/pgsql.c
parentf0aa379dc13a7cca7e2e858277559c80a0f87f9d (diff)
parentfb205020ce2dd97d777e09d2debf38a01075d370 (diff)
downloadphp-git-61843012125dbc87916a4665bfed8a26c0413040.tar.gz
Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1: Fixed #75838 (Memory leak in pg_escape_bytea())
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r--ext/pgsql/pgsql.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 2d78af439c..fb29b54e87 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -4428,6 +4428,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);
}
/* }}} */