Fossil SCM
Making annotate not segfault for the complex test case I have. There is still a little leak... but muuuch smaller than it was.
Commit
fa760a24cd50191313bb8f7aebf6c4d86a85eeaa
Parent
73b6ff49666b016…
1 file changed
+1
-1
+1
-1
| --- src/content.c | ||
| +++ src/content.c | ||
| @@ -95,11 +95,11 @@ | ||
| 95 | 95 | p = &contentCache.a[contentCache.n++]; |
| 96 | 96 | p->rid = rid; |
| 97 | 97 | p->age = contentCache.nextAge++; |
| 98 | 98 | contentCache.szTotal += blob_size(pBlob); |
| 99 | 99 | p->content = *pBlob; |
| 100 | - blob_reset(pBlob); | |
| 100 | + *pBlob = empty_blob; | |
| 101 | 101 | bag_insert(&contentCache.inCache, rid); |
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | /* |
| 105 | 105 | ** Clear the content cache. |
| 106 | 106 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -95,11 +95,11 @@ | |
| 95 | p = &contentCache.a[contentCache.n++]; |
| 96 | p->rid = rid; |
| 97 | p->age = contentCache.nextAge++; |
| 98 | contentCache.szTotal += blob_size(pBlob); |
| 99 | p->content = *pBlob; |
| 100 | blob_reset(pBlob); |
| 101 | bag_insert(&contentCache.inCache, rid); |
| 102 | } |
| 103 | |
| 104 | /* |
| 105 | ** Clear the content cache. |
| 106 |
| --- src/content.c | |
| +++ src/content.c | |
| @@ -95,11 +95,11 @@ | |
| 95 | p = &contentCache.a[contentCache.n++]; |
| 96 | p->rid = rid; |
| 97 | p->age = contentCache.nextAge++; |
| 98 | contentCache.szTotal += blob_size(pBlob); |
| 99 | p->content = *pBlob; |
| 100 | *pBlob = empty_blob; |
| 101 | bag_insert(&contentCache.inCache, rid); |
| 102 | } |
| 103 | |
| 104 | /* |
| 105 | ** Clear the content cache. |
| 106 |