Fossil SCM

Attempt to fix a memory leak on Git import.

drh 2019-12-19 15:13 trunk
Commit 81bfdca9e5119790a3efa5679cfb1116bd6571ee322c2fc87fb25db497d36d88
1 file changed +1
--- src/import.c
+++ src/import.c
@@ -323,10 +323,11 @@
323323
gg.zMark, gg.zBranch);
324324
blob_appendf(&record, "U %F\n", gg.zUser);
325325
md5sum_blob(&record, &cksum);
326326
blob_appendf(&record, "Z %b\n", &cksum);
327327
fast_insert_content(&record, gg.zMark, 1, 1);
328
+ blob_reset(&record);
328329
blob_reset(&cksum);
329330
330331
/* The "git fast-export" command might output multiple "commit" lines
331332
** that reference a tag using "refs/tags/TAGNAME". The tag should only
332333
** be applied to the last commit that is output. The problem is we do not
333334
--- src/import.c
+++ src/import.c
@@ -323,10 +323,11 @@
323 gg.zMark, gg.zBranch);
324 blob_appendf(&record, "U %F\n", gg.zUser);
325 md5sum_blob(&record, &cksum);
326 blob_appendf(&record, "Z %b\n", &cksum);
327 fast_insert_content(&record, gg.zMark, 1, 1);
 
328 blob_reset(&cksum);
329
330 /* The "git fast-export" command might output multiple "commit" lines
331 ** that reference a tag using "refs/tags/TAGNAME". The tag should only
332 ** be applied to the last commit that is output. The problem is we do not
333
--- src/import.c
+++ src/import.c
@@ -323,10 +323,11 @@
323 gg.zMark, gg.zBranch);
324 blob_appendf(&record, "U %F\n", gg.zUser);
325 md5sum_blob(&record, &cksum);
326 blob_appendf(&record, "Z %b\n", &cksum);
327 fast_insert_content(&record, gg.zMark, 1, 1);
328 blob_reset(&record);
329 blob_reset(&cksum);
330
331 /* The "git fast-export" command might output multiple "commit" lines
332 ** that reference a tag using "refs/tags/TAGNAME". The tag should only
333 ** be applied to the last commit that is output. The problem is we do not
334

Keyboard Shortcuts

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