com php-src: Fixed #75838 (Memory leak in pg_escape_bytea ()): NEWS ext/pgsql/pgsql.c
| From: | Xinchen Hui | Date: | Thu, 18 Jan 2018 02:53:23 +0000 |
| Subject: | com php-src: Fixed #75838 (Memory leak in pg_escape_bytea ()): NEWS ext/pgsql/pgsql.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-100957@lists.php.net to get a copy of this message | ||
Commit: fb205020ce2dd97d777e09d2debf38a01075d370
Author: Xinchen Hui <laruence@gmail.com> Thu, 18 Jan 2018 10:53:23 +0800
Parents: 043d53c7891e7f9437221acaf0fe0fd09a318b41
Branches: PHP-7.1 PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fb205020ce2dd97d777e09d2debf38a01075d370
Log:
Fixed #75838 (Memory leak in pg_escape_bytea())
Bugs:
https://bugs.php.net/75838
Changed paths:
M NEWS
M ext/pgsql/pgsql.c
Diff:
diff --git a/NEWS b/NEWS
index 86a51bf..1af8cff 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 2b9e069..904b9aa 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);
}
/* }}} */