Skip to content

Commit fb20502

Browse files
committed
Fixed #75838 (Memory leak in pg_escape_bytea())
1 parent 043d53c commit fb20502

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

NEWS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? 2018, PHP 7.1.15
44

5-
5+
- PGSQL:
6+
. Fixed #75838 (Memory leak in pg_escape_bytea()). (ard_1 at mail dot ru)
67

78
01 Feb 2018, PHP 7.1.14
89

ext/pgsql/pgsql.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4442,6 +4442,7 @@ PHP_FUNCTION(pg_escape_bytea)
44424442
to = (char *)PQescapeBytea((unsigned char*)from, from_len, &to_len);
44434443

44444444
RETVAL_STRINGL(to, to_len-1); /* to_len includes additional '\0' */
4445+
PQfreemem(to);
44454446
}
44464447
/* }}} */
44474448

0 commit comments

Comments
 (0)