Fossil SCM
Fix references to uninitialized memory when existing the SQL shell.
Commit
1955e6a69d753a0190956176e9601f40532bca31
Parent
49c63f8c78a38b4…
1 file changed
+1
+1
| --- src/sqlcmd.c | ||
| +++ src/sqlcmd.c | ||
| @@ -143,10 +143,11 @@ | ||
| 143 | 143 | extern int sqlite3_shell(int, char**); |
| 144 | 144 | db_find_and_open_repository(OPEN_ANY_SCHEMA, 0); |
| 145 | 145 | db_close(1); |
| 146 | 146 | sqlite3_shutdown(); |
| 147 | 147 | sqlite3_shell(g.argc-1, g.argv+1); |
| 148 | + g.db = 0; | |
| 148 | 149 | } |
| 149 | 150 | |
| 150 | 151 | /* |
| 151 | 152 | ** This routine is called by the patched sqlite3 command-line shell in order |
| 152 | 153 | ** to load the name and database connection for the open Fossil database. |
| 153 | 154 |
| --- 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 |