Fossil SCM

Fix references to uninitialized memory when existing the SQL shell.

drh 2012-10-08 13:50 trunk
Commit 1955e6a69d753a0190956176e9601f40532bca31
1 file changed +1
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -143,10 +143,11 @@
143143
extern int sqlite3_shell(int, char**);
144144
db_find_and_open_repository(OPEN_ANY_SCHEMA, 0);
145145
db_close(1);
146146
sqlite3_shutdown();
147147
sqlite3_shell(g.argc-1, g.argv+1);
148
+ g.db = 0;
148149
}
149150
150151
/*
151152
** This routine is called by the patched sqlite3 command-line shell in order
152153
** to load the name and database connection for the open Fossil database.
153154
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -143,10 +143,11 @@
143 extern int sqlite3_shell(int, char**);
144 db_find_and_open_repository(OPEN_ANY_SCHEMA, 0);
145 db_close(1);
146 sqlite3_shutdown();
147 sqlite3_shell(g.argc-1, g.argv+1);
 
148 }
149
150 /*
151 ** This routine is called by the patched sqlite3 command-line shell in order
152 ** to load the name and database connection for the open Fossil database.
153
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -143,10 +143,11 @@
143 extern int sqlite3_shell(int, char**);
144 db_find_and_open_repository(OPEN_ANY_SCHEMA, 0);
145 db_close(1);
146 sqlite3_shutdown();
147 sqlite3_shell(g.argc-1, g.argv+1);
148 g.db = 0;
149 }
150
151 /*
152 ** This routine is called by the patched sqlite3 command-line shell in order
153 ** to load the name and database connection for the open Fossil database.
154

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button