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.

viriketo 2011-09-04 21:02 UTC annotate_noleak
Commit fa760a24cd50191313bb8f7aebf6c4d86a85eeaa
1 file changed +1 -1
+1 -1
--- src/content.c
+++ src/content.c
@@ -95,11 +95,11 @@
9595
p = &contentCache.a[contentCache.n++];
9696
p->rid = rid;
9797
p->age = contentCache.nextAge++;
9898
contentCache.szTotal += blob_size(pBlob);
9999
p->content = *pBlob;
100
- blob_reset(pBlob);
100
+ *pBlob = empty_blob;
101101
bag_insert(&contentCache.inCache, rid);
102102
}
103103
104104
/*
105105
** Clear the content cache.
106106
--- 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

Keyboard Shortcuts

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