Index: src/shell.c.in ================================================================== --- src/shell.c.in +++ src/shell.c.in @@ -800,12 +800,13 @@ sqlite3_value **apVal ){ const char *zName = (const char*)sqlite3_value_text(apVal[0]); char *zFake = shellFakeSchema(sqlite3_context_db_handle(pCtx), 0, zName); if( zFake ){ - sqlite3_result_text(pCtx, sqlite3_mprintf("/* %z */", zFake), + sqlite3_result_text(pCtx, sqlite3_mprintf("/* %s */", zFake), -1, sqlite3_free); + free(zFake); } } /* ** SQL function: shell_add_schema(S,X) @@ -861,14 +862,15 @@ if( zName && aPrefix[i][0]=='V' && (zFake = shellFakeSchema(db, zSchema, zName))!=0 ){ if( z==0 ){ - z = sqlite3_mprintf("%s\n/* %z */", zIn, zFake); + z = sqlite3_mprintf("%s\n/* %s */", zIn, zFake); }else{ - z = sqlite3_mprintf("%z\n/* %z */", z, zFake); + z = sqlite3_mprintf("%z\n/* %s */", z, zFake); } + free(zFake); } if( z ){ sqlite3_result_text(pCtx, z, -1, sqlite3_free); return; }