Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Fix a memory leak that was discovered by the tests that were added to cover ticket #2339. (CVS 4069) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
1d10a489340718cc708e11e28e7bb31c |
User & Date: | drh 2007-06-15 15:31:50 |
Context
2007-06-15
| ||
16:37 | Fix an obscure memory leak in the SQL compiler.. (CVS 4070) check-in: d4ab9428 user: danielk1977 tags: trunk | |
15:31 | Fix a memory leak that was discovered by the tests that were added to cover ticket #2339. (CVS 4069) check-in: 1d10a489 user: drh tags: trunk | |
15:08 | Fix a test suite bug. To accommadate the fact that handles returned by (db incrblob) change for the second test suite iteration of full.test. (CVS 4068) check-in: 32218834 user: danielk1977 tags: trunk | |
Changes
Changes to src/select.c.
8 8 ** May you find forgiveness for yourself and forgive others. 9 9 ** May you share freely, never taking more than you give. 10 10 ** 11 11 ************************************************************************* 12 12 ** This file contains C code routines that are called by the parser 13 13 ** to handle SELECT statements in SQLite. 14 14 ** 15 -** $Id: select.c,v 1.350 2007/06/07 10:55:36 drh Exp $ 15 +** $Id: select.c,v 1.351 2007/06/15 15:31:50 drh Exp $ 16 16 */ 17 17 #include "sqliteInt.h" 18 18 19 19 20 20 /* 21 21 ** Delete all the content of a Select structure but do not deallocate 22 22 ** the select structure itself. ................................................................................ 1767 1767 p->pOrderBy = 0; 1768 1768 p->disallowOrderBy = pOrderBy!=0; 1769 1769 pLimit = p->pLimit; 1770 1770 p->pLimit = 0; 1771 1771 pOffset = p->pOffset; 1772 1772 p->pOffset = 0; 1773 1773 rc = sqlite3Select(pParse, p, op, unionTab, 0, 0, 0, aff); 1774 + /* Query flattening in sqlite3Select() might refill p->pOrderBy. 1775 + ** Be sure to delete p->pOrderBy, therefore, to avoid a memory leak. */ 1776 + sqlite3ExprListDelete(p->pOrderBy); 1774 1777 p->pPrior = pPrior; 1775 1778 p->pOrderBy = pOrderBy; 1776 1779 sqlite3ExprDelete(p->pLimit); 1777 1780 p->pLimit = pLimit; 1778 1781 p->pOffset = pOffset; 1779 1782 p->iLimit = -1; 1780 1783 p->iOffset = -1;