Fossil SCM

Fix a duplicated blob initialization in attach_commit().

stephan 2026-06-07 14:49 UTC forum-editor-2026
Commit 195571aa79e79f0e61cecfeccefb4ad9b460950dfb18ffe361a621f8392fbd0e
1 file changed +2 -4
+2 -4
--- src/attach.c
+++ src/attach.c
@@ -538,14 +538,12 @@
538538
int addCompress = 0;
539539
Manifest *pManifest;
540540
541541
db_begin_transaction();
542542
blob_init(&content, aContent, szContent);
543
- pManifest = manifest_parse(&content, 0, 0);
544
- manifest_destroy(pManifest);
545
- blob_init(&content, aContent, szContent);
546
- if( pManifest ){
543
+ if( (pManifest = manifest_parse(&content, 0, 0)) ){
544
+ manifest_destroy(pManifest);
547545
blob_compress(&content, &content);
548546
addCompress = 1;
549547
}
550548
rid = content_put_ex(&content, 0, 0, 0, needModerator);
551549
zUUID = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
552550
--- src/attach.c
+++ src/attach.c
@@ -538,14 +538,12 @@
538 int addCompress = 0;
539 Manifest *pManifest;
540
541 db_begin_transaction();
542 blob_init(&content, aContent, szContent);
543 pManifest = manifest_parse(&content, 0, 0);
544 manifest_destroy(pManifest);
545 blob_init(&content, aContent, szContent);
546 if( pManifest ){
547 blob_compress(&content, &content);
548 addCompress = 1;
549 }
550 rid = content_put_ex(&content, 0, 0, 0, needModerator);
551 zUUID = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
552
--- src/attach.c
+++ src/attach.c
@@ -538,14 +538,12 @@
538 int addCompress = 0;
539 Manifest *pManifest;
540
541 db_begin_transaction();
542 blob_init(&content, aContent, szContent);
543 if( (pManifest = manifest_parse(&content, 0, 0)) ){
544 manifest_destroy(pManifest);
 
 
545 blob_compress(&content, &content);
546 addCompress = 1;
547 }
548 rid = content_put_ex(&content, 0, 0, 0, needModerator);
549 zUUID = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid);
550

Keyboard Shortcuts

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