diff options
| author | Ilia Alshanetsky <iliaa@php.net> | 2006-05-08 14:33:00 +0000 |
|---|---|---|
| committer | Ilia Alshanetsky <iliaa@php.net> | 2006-05-08 14:33:00 +0000 |
| commit | 79ebfe382b8015ea812b6bbc403f9184fa3e4ffe (patch) | |
| tree | dcdc6f08ebd4fcadaa857d11863387d5830934df /ext/pdo_pgsql/pgsql_driver.c | |
| parent | 3bad805e35411e18d56dcfb93948030d600dd975 (diff) | |
| download | php-git-79ebfe382b8015ea812b6bbc403f9184fa3e4ffe.tar.gz | |
Fixed memory leaks when working with cursors in PDO PostgreSQL driver.
Diffstat (limited to 'ext/pdo_pgsql/pgsql_driver.c')
| -rw-r--r-- | ext/pdo_pgsql/pgsql_driver.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index 7b1561506a..ed28052d2c 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -229,6 +229,9 @@ static int pgsql_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len, PDO_CURSOR_FWDONLY TSRMLS_CC) == PDO_CURSOR_SCROLL; if (scrollable) { + if (S->cursor_name) { + efree(S->cursor_name); + } /* TODO: check how scrollable cursors related to prepared statements */ spprintf(&S->cursor_name, 0, "pdo_pgsql_cursor_%08x", (unsigned int) stmt); } |
