Fixed #75838 (Memory leak in pg_escape_bytea())

This commit is contained in:
Xinchen Hui 2018-01-18 10:53:23 +08:00
parent 043d53c789
commit fb205020ce
2 changed files with 3 additions and 1 deletions

View file

@ -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);
}
/* }}} */