From b8c5cd2a9d25e23b3376f9913a1991511721a1cb Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Fri, 2 May 2003 22:17:01 +0000 Subject: Fix MFN error --- ext/sqlite/sqlite.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'ext/sqlite/sqlite.c') diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index 4aa390fc78..07d3e60cbb 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -218,15 +218,14 @@ static void real_result_dtor(struct php_sqlite_result *res TSRMLS_DC) if (res->table) { if (!res->buffered && res->nrows) { res->nrows = 1; /* only one row is stored */ - } - for (i = 0; i < res->nrows; i++) { - base = i * res->ncolumns; - for (j = 0; j < res->ncolumns; j++) { - if (res->table[base + j] != NULL) { - efree(res->table[base + j]); + for (i = 0; i < res->nrows; i++) { + base = i * res->ncolumns; + for (j = 0; j < res->ncolumns; j++) { + if (res->table[base + j] != NULL) { + efree(res->table[base + j]); + } } } - } efree(res->table); } if (res->col_names) { -- cgit v1.2.1