Fossil SCM
Fix a memory leak in the check-out logic that prevents opening of massive repositories.
Commit
726a13d29689f4b92749072c2a47771767960373
Parent
ea27129c88e9aae…
1 file changed
+1
+1
| --- src/vfile.c | ||
| +++ src/vfile.c | ||
| @@ -235,10 +235,11 @@ | ||
| 235 | 235 | zName = db_column_text(&q, 1); |
| 236 | 236 | rid = db_column_int(&q, 2); |
| 237 | 237 | content_get(rid, &content); |
| 238 | 238 | if( verbose ) printf("%s\n", &zName[nRepos]); |
| 239 | 239 | blob_write_to_file(&content, zName); |
| 240 | + blob_reset(&content); | |
| 240 | 241 | db_multi_exec("UPDATE vfile SET mtime=%lld WHERE id=%d", |
| 241 | 242 | file_mtime(zName), id); |
| 242 | 243 | } |
| 243 | 244 | db_finalize(&q); |
| 244 | 245 | } |
| 245 | 246 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -235,10 +235,11 @@ | |
| 235 | zName = db_column_text(&q, 1); |
| 236 | rid = db_column_int(&q, 2); |
| 237 | content_get(rid, &content); |
| 238 | if( verbose ) printf("%s\n", &zName[nRepos]); |
| 239 | blob_write_to_file(&content, zName); |
| 240 | db_multi_exec("UPDATE vfile SET mtime=%lld WHERE id=%d", |
| 241 | file_mtime(zName), id); |
| 242 | } |
| 243 | db_finalize(&q); |
| 244 | } |
| 245 |
| --- src/vfile.c | |
| +++ src/vfile.c | |
| @@ -235,10 +235,11 @@ | |
| 235 | zName = db_column_text(&q, 1); |
| 236 | rid = db_column_int(&q, 2); |
| 237 | content_get(rid, &content); |
| 238 | if( verbose ) printf("%s\n", &zName[nRepos]); |
| 239 | blob_write_to_file(&content, zName); |
| 240 | blob_reset(&content); |
| 241 | db_multi_exec("UPDATE vfile SET mtime=%lld WHERE id=%d", |
| 242 | file_mtime(zName), id); |
| 243 | } |
| 244 | db_finalize(&q); |
| 245 | } |
| 246 |