SQLite

Check-in [c9f3405eea]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a memory leak.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | bytecode-function
Files: files | file ages | folders
SHA3-256: c9f3405eeac8aff171b5d76bae954f3b51b353d16286a3d2af43ef942c212abc
User & Date: drh 2020-03-24 17:52:31.944
Context
2020-03-24
18:41
Optimize the "subprog IS NULL" constraint. (check-in: ca8c5f028b user: drh tags: bytecode-function)
17:52
Fix a memory leak. (check-in: c9f3405eea user: drh tags: bytecode-function)
13:27
Provide content for the bytecode.subprog column. (check-in: df893364b7 user: drh tags: bytecode-function)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/vdbevtab.c.
101
102
103
104
105
106
107

108
109
110
111
112
113
114

/*
** Clear all internal content from a bytecodevtab cursor.
*/
static void bytecodevtabCursorClear(bytecodevtab_cursor *pCur){
  sqlite3_free(pCur->zP4);
  pCur->zP4 = 0;

  sqlite3VdbeMemSetNull(&pCur->sub);
  if( pCur->needFinalize ){
    sqlite3_finalize(pCur->pStmt);
  }
  pCur->pStmt = 0;
  pCur->needFinalize = 0;
}







>







101
102
103
104
105
106
107
108
109
110
111
112
113
114
115

/*
** Clear all internal content from a bytecodevtab cursor.
*/
static void bytecodevtabCursorClear(bytecodevtab_cursor *pCur){
  sqlite3_free(pCur->zP4);
  pCur->zP4 = 0;
  sqlite3VdbeMemRelease(&pCur->sub);
  sqlite3VdbeMemSetNull(&pCur->sub);
  if( pCur->needFinalize ){
    sqlite3_finalize(pCur->pStmt);
  }
  pCur->pStmt = 0;
  pCur->needFinalize = 0;
}