mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Merge branch 'PHP-5.6'
* PHP-5.6: updated NEWS updated NEWS fix memory leak in pdo_pgsql closeCursor (bug 69752)
This commit is contained in:
commit
8ad5111d1c
2 changed files with 61 additions and 1 deletions
|
@ -224,7 +224,7 @@ stmt_retry:
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (!stmt->executed && !stmt->column_count) {
|
||||
if (!stmt->executed && (!stmt->column_count || S->cols == NULL)) {
|
||||
stmt->column_count = (int) PQnfields(S->result);
|
||||
S->cols = ecalloc(stmt->column_count, sizeof(pdo_pgsql_column));
|
||||
}
|
||||
|
@ -618,6 +618,12 @@ done:
|
|||
|
||||
static int pdo_pgsql_stmt_cursor_closer(pdo_stmt_t *stmt)
|
||||
{
|
||||
pdo_pgsql_stmt *S = (pdo_pgsql_stmt*)stmt->driver_data;
|
||||
|
||||
if (S->cols != NULL){
|
||||
efree(S->cols);
|
||||
S->cols = NULL;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue