Fossil SCM
Fix a large memory leak in the "fossil reconstruct" command. Ticket [fc1a61329403f605c494]
Commit
9ef4a184f4b1aa6ae7b9635ec2b0c7a325043df5
Parent
a203674aa54063b…
1 file changed
+2
+2
| --- src/rebuild.c | ||
| +++ src/rebuild.c | ||
| @@ -446,10 +446,12 @@ | ||
| 446 | 446 | blob_appendf(&path, "%s/%s", g.argv[3], pEntry->d_name); |
| 447 | 447 | if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){ |
| 448 | 448 | fossil_panic("Some unknown error occurred while reading \"%s\"", blob_str(&path)); |
| 449 | 449 | } |
| 450 | 450 | content_put(&aContent, 0, 0); |
| 451 | + blob_reset(&path); | |
| 452 | + blob_reset(&aContent); | |
| 451 | 453 | } |
| 452 | 454 | } |
| 453 | 455 | else { |
| 454 | 456 | fossil_panic("Encountered error %d while trying to open \"%s\".", errno, g.argv[3]); |
| 455 | 457 | } |
| 456 | 458 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -446,10 +446,12 @@ | |
| 446 | blob_appendf(&path, "%s/%s", g.argv[3], pEntry->d_name); |
| 447 | if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){ |
| 448 | fossil_panic("Some unknown error occurred while reading \"%s\"", blob_str(&path)); |
| 449 | } |
| 450 | content_put(&aContent, 0, 0); |
| 451 | } |
| 452 | } |
| 453 | else { |
| 454 | fossil_panic("Encountered error %d while trying to open \"%s\".", errno, g.argv[3]); |
| 455 | } |
| 456 |
| --- src/rebuild.c | |
| +++ src/rebuild.c | |
| @@ -446,10 +446,12 @@ | |
| 446 | blob_appendf(&path, "%s/%s", g.argv[3], pEntry->d_name); |
| 447 | if( blob_read_from_file(&aContent, blob_str(&path))==-1 ){ |
| 448 | fossil_panic("Some unknown error occurred while reading \"%s\"", blob_str(&path)); |
| 449 | } |
| 450 | content_put(&aContent, 0, 0); |
| 451 | blob_reset(&path); |
| 452 | blob_reset(&aContent); |
| 453 | } |
| 454 | } |
| 455 | else { |
| 456 | fossil_panic("Encountered error %d while trying to open \"%s\".", errno, g.argv[3]); |
| 457 | } |
| 458 |