Fossil SCM

Fix a memory leak in the check-out logic that prevents opening of massive repositories.

drh 2010-01-20 15:43 trunk
Commit 726a13d29689f4b92749072c2a47771767960373
1 file changed +1
--- src/vfile.c
+++ src/vfile.c
@@ -235,10 +235,11 @@
235235
zName = db_column_text(&q, 1);
236236
rid = db_column_int(&q, 2);
237237
content_get(rid, &content);
238238
if( verbose ) printf("%s\n", &zName[nRepos]);
239239
blob_write_to_file(&content, zName);
240
+ blob_reset(&content);
240241
db_multi_exec("UPDATE vfile SET mtime=%lld WHERE id=%d",
241242
file_mtime(zName), id);
242243
}
243244
db_finalize(&q);
244245
}
245246
--- 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

Keyboard Shortcuts

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