Fossil SCM

Moved a blob_reset() to fix a leak reported in https://fossil-scm.org/forum/forumpost/6871eaaa07.

stephan 2019-12-19 14:40 trunk
Commit 8628cbd428cb507ce67682ec96904553417e631a43afa3dd5d78706d7254c31c
1 file changed +1 -1
+1 -1
--- src/import.c
+++ src/import.c
@@ -346,14 +346,14 @@
346346
blob_appendf(&record, "Z %b\n", &cksum);
347347
db_multi_exec(
348348
"INSERT OR REPLACE INTO xtag(tname, tcontent)"
349349
" VALUES(%Q,%Q)", gg.zBranch, blob_str(&record)
350350
);
351
- blob_reset(&record);
352351
blob_reset(&cksum);
353352
}
354353
354
+ blob_reset(&record);
355355
fossil_free(gg.zPrevBranch);
356356
gg.zPrevBranch = gg.zBranch;
357357
gg.zBranch = 0;
358358
import_reset(0);
359359
}
360360
--- src/import.c
+++ src/import.c
@@ -346,14 +346,14 @@
346 blob_appendf(&record, "Z %b\n", &cksum);
347 db_multi_exec(
348 "INSERT OR REPLACE INTO xtag(tname, tcontent)"
349 " VALUES(%Q,%Q)", gg.zBranch, blob_str(&record)
350 );
351 blob_reset(&record);
352 blob_reset(&cksum);
353 }
354
 
355 fossil_free(gg.zPrevBranch);
356 gg.zPrevBranch = gg.zBranch;
357 gg.zBranch = 0;
358 import_reset(0);
359 }
360
--- src/import.c
+++ src/import.c
@@ -346,14 +346,14 @@
346 blob_appendf(&record, "Z %b\n", &cksum);
347 db_multi_exec(
348 "INSERT OR REPLACE INTO xtag(tname, tcontent)"
349 " VALUES(%Q,%Q)", gg.zBranch, blob_str(&record)
350 );
 
351 blob_reset(&cksum);
352 }
353
354 blob_reset(&record);
355 fossil_free(gg.zPrevBranch);
356 gg.zPrevBranch = gg.zBranch;
357 gg.zBranch = 0;
358 import_reset(0);
359 }
360

Keyboard Shortcuts

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