Fossil SCM
Fix memory leak from previous commit
Commit
9ab7122d6a00c7bd017727434983104a3997c181
Parent
28dd7c1daaf38d6…
1 file changed
+4
-3
+4
-3
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1752,20 +1752,21 @@ | ||
| 1752 | 1752 | "SELECT count(*) FROM timeline WHERE etype!='div'" |
| 1753 | 1753 | " AND sortby<=%f /*scan*/", rCirca); |
| 1754 | 1754 | nAfter = db_int(0, |
| 1755 | 1755 | "SELECT count(*) FROM timeline WHERE etype!='div'" |
| 1756 | 1756 | " AND sortby>=%f /*scan*/", rCirca); |
| 1757 | - zDate = db_text(0, "SELECT min(timestamp) FROM timeline /*scan*/"); | |
| 1758 | 1757 | if( nBefore>=nEntry ){ |
| 1758 | + zDate = db_text(0, "SELECT min(timestamp) FROM timeline /*scan*/"); | |
| 1759 | 1759 | timeline_submenu(&url, "Older", "b", zDate, "c"); |
| 1760 | 1760 | zOlderButton = fossil_strdup(url_render(&url, "b", zDate, "c", 0)); |
| 1761 | + free(zDate); | |
| 1761 | 1762 | } |
| 1762 | - zDate = db_text(0, "SELECT max(timestamp) FROM timeline /*scan*/"); | |
| 1763 | 1763 | if( nAfter>=nEntry ){ |
| 1764 | + zDate = db_text(0, "SELECT max(timestamp) FROM timeline /*scan*/"); | |
| 1764 | 1765 | timeline_submenu(&url, "Newer", "a", zDate, "c"); |
| 1766 | + free(zDate); | |
| 1765 | 1767 | } |
| 1766 | - free(zDate); | |
| 1767 | 1768 | }else{ |
| 1768 | 1769 | if( zAfter || n==nEntry ){ |
| 1769 | 1770 | zDate = db_text(0, "SELECT min(timestamp) FROM timeline /*scan*/"); |
| 1770 | 1771 | timeline_submenu(&url, "Older", "b", zDate, "a"); |
| 1771 | 1772 | zOlderButton = fossil_strdup(url_render(&url, "b", zDate, "a", 0)); |
| 1772 | 1773 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1752,20 +1752,21 @@ | |
| 1752 | "SELECT count(*) FROM timeline WHERE etype!='div'" |
| 1753 | " AND sortby<=%f /*scan*/", rCirca); |
| 1754 | nAfter = db_int(0, |
| 1755 | "SELECT count(*) FROM timeline WHERE etype!='div'" |
| 1756 | " AND sortby>=%f /*scan*/", rCirca); |
| 1757 | zDate = db_text(0, "SELECT min(timestamp) FROM timeline /*scan*/"); |
| 1758 | if( nBefore>=nEntry ){ |
| 1759 | timeline_submenu(&url, "Older", "b", zDate, "c"); |
| 1760 | zOlderButton = fossil_strdup(url_render(&url, "b", zDate, "c", 0)); |
| 1761 | } |
| 1762 | zDate = db_text(0, "SELECT max(timestamp) FROM timeline /*scan*/"); |
| 1763 | if( nAfter>=nEntry ){ |
| 1764 | timeline_submenu(&url, "Newer", "a", zDate, "c"); |
| 1765 | } |
| 1766 | free(zDate); |
| 1767 | }else{ |
| 1768 | if( zAfter || n==nEntry ){ |
| 1769 | zDate = db_text(0, "SELECT min(timestamp) FROM timeline /*scan*/"); |
| 1770 | timeline_submenu(&url, "Older", "b", zDate, "a"); |
| 1771 | zOlderButton = fossil_strdup(url_render(&url, "b", zDate, "a", 0)); |
| 1772 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1752,20 +1752,21 @@ | |
| 1752 | "SELECT count(*) FROM timeline WHERE etype!='div'" |
| 1753 | " AND sortby<=%f /*scan*/", rCirca); |
| 1754 | nAfter = db_int(0, |
| 1755 | "SELECT count(*) FROM timeline WHERE etype!='div'" |
| 1756 | " AND sortby>=%f /*scan*/", rCirca); |
| 1757 | if( nBefore>=nEntry ){ |
| 1758 | zDate = db_text(0, "SELECT min(timestamp) FROM timeline /*scan*/"); |
| 1759 | timeline_submenu(&url, "Older", "b", zDate, "c"); |
| 1760 | zOlderButton = fossil_strdup(url_render(&url, "b", zDate, "c", 0)); |
| 1761 | free(zDate); |
| 1762 | } |
| 1763 | if( nAfter>=nEntry ){ |
| 1764 | zDate = db_text(0, "SELECT max(timestamp) FROM timeline /*scan*/"); |
| 1765 | timeline_submenu(&url, "Newer", "a", zDate, "c"); |
| 1766 | free(zDate); |
| 1767 | } |
| 1768 | }else{ |
| 1769 | if( zAfter || n==nEntry ){ |
| 1770 | zDate = db_text(0, "SELECT min(timestamp) FROM timeline /*scan*/"); |
| 1771 | timeline_submenu(&url, "Older", "b", zDate, "a"); |
| 1772 | zOlderButton = fossil_strdup(url_render(&url, "b", zDate, "a", 0)); |
| 1773 |