mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-05 04:30:38 +03:00
Fix a uninitialized variable use in the command-line shell when the
".open" command is invoked without any arguments. FossilOrigin-Name: fc4f4d1eccec2e09b5d2e6c4da082204f4d5a016
This commit is contained in:
@@ -3354,9 +3354,8 @@ static int do_meta_command(char *zLine, ShellState *p){
|
||||
const char *zSavedFilename = p->zDbFilename;
|
||||
char *zNewFilename = 0;
|
||||
p->db = 0;
|
||||
if( nArg>=2 ){
|
||||
p->zDbFilename = zNewFilename = sqlite3_mprintf("%s", azArg[1]);
|
||||
}
|
||||
if( nArg>=2 ) zNewFilename = sqlite3_mprintf("%s", azArg[1]);
|
||||
p->zDbFilename = zNewFilename;
|
||||
open_db(p, 1);
|
||||
if( p->db!=0 ){
|
||||
sqlite3_close(savedDb);
|
||||
|
||||
Reference in New Issue
Block a user