Fossil SCM
Fix a duplicated blob initialization in attach_commit().
Commit
195571aa79e79f0e61cecfeccefb4ad9b460950dfb18ffe361a621f8392fbd0e
Parent
46bb3a1255dc879…
1 file changed
+2
-4
+2
-4
| --- src/attach.c | ||
| +++ src/attach.c | ||
| @@ -538,14 +538,12 @@ | ||
| 538 | 538 | int addCompress = 0; |
| 539 | 539 | Manifest *pManifest; |
| 540 | 540 | |
| 541 | 541 | db_begin_transaction(); |
| 542 | 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 ){ | |
| 543 | + if( (pManifest = manifest_parse(&content, 0, 0)) ){ | |
| 544 | + manifest_destroy(pManifest); | |
| 547 | 545 | blob_compress(&content, &content); |
| 548 | 546 | addCompress = 1; |
| 549 | 547 | } |
| 550 | 548 | rid = content_put_ex(&content, 0, 0, 0, needModerator); |
| 551 | 549 | zUUID = db_text(0, "SELECT uuid FROM blob WHERE rid=%d", rid); |
| 552 | 550 |
| --- 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 |