diff options
author | drh <> | 2024-03-09 18:41:40 +0000 |
---|---|---|
committer | drh <> | 2024-03-09 18:41:40 +0000 |
commit | 5007833f5f82d33c95f44c65fc46221de1c5950f (patch) | |
tree | 3e9ddbca8dbadbb682c5f2ded3434fcd44e73c6a /src | |
parent | aa13f4c132ced1fda8d0d436b72c9c0b58ab16e2 (diff) | |
download | sqlite-5007833f5f82d33c95f44c65fc46221de1c5950f.tar.gz sqlite-5007833f5f82d33c95f44c65fc46221de1c5950f.zip |
Fix the .expert command in the shell so that it does not leak memory if not
followed by SQL and so that it works with reverse_unordered_selects.
FossilOrigin-Name: 7ead022edaf7a0cd6a8976a1261246084975c9a5be5c893f6c751bb5f963ac0f
Diffstat (limited to 'src')
-rw-r--r-- | src/shell.c.in | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/shell.c.in b/src/shell.c.in index 1d7f8df45..73161cf64 100644 --- a/src/shell.c.in +++ b/src/shell.c.in @@ -12772,6 +12772,11 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){ #ifndef SQLITE_SHELL_FIDDLE /* In WASM mode we have to leave the db state in place so that ** client code can "push" SQL into it after this call returns. */ +#ifndef SQLITE_OMIT_VIRTUALTABLE + if( data.expert.pExpert ){ + expertFinish(&data, 1, 0); + } +#endif free(azCmd); set_table_name(&data, 0); if( data.db ){ |