diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2005-07-07 15:54:00 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2005-07-07 15:54:00 +0000 |
commit | 307f6228175da3f68c0d1957de3e86c9132b1e61 (patch) | |
tree | de5489e0a0737ccb5e022709afc09c775e3eee94 | |
parent | 82da3f50746d4d49bdf9f14d2daa30b472e3576c (diff) | |
download | php-git-307f6228175da3f68c0d1957de3e86c9132b1e61.tar.gz |
Fixed memory leak.
-rwxr-xr-x | ext/pdo_mysql/mysql_statement.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index 31b26f4ed8..c59f53c8db 100755 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -55,7 +55,13 @@ static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC) efree(S->in_null); efree(S->in_length); } - if (S->bound_result) { + if (S->bound_result) + { + int i; + for (i = 0; i < stmt->column_count; i++) { + efree(S->bound_result[i].buffer); + } + efree(S->bound_result); efree(S->out_null); efree(S->out_length); |