Check-in [625226d577]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix memory leaks in "fossil rebuild".
Timelines: family | ancestors | descendants | both | windows-i18n
Files: files | file ages | folders
SHA1:625226d577c2b329cd109b52d5da118e4f50accf
User & Date: drh 2011-05-13 20:30:52
References
2011-05-20
07:58 Closed ticket [2e0d927de8]: SQLITE_CANTOPEN with latest fossil release plus 2 other changes artifact: 9d60cda62c user: anonymous
Context
2011-05-20
11:22
Convert some fopen() calls to fossil_fopen(). Missed them previously. check-in: f626fcaab6 user: drh tags: windows-i18n
2011-05-13
20:30
Fix memory leaks in "fossil rebuild". check-in: 625226d577 user: drh tags: windows-i18n
17:13
Ignore short writes when writing to the console. check-in: e7babf5222 user: drh tags: windows-i18n
Changes

Changes to src/tkt.c.

214
215
216
217
218
219
220
221

222
223
224
225
226
227
228
*/
void ticket_rebuild_entry(const char *zTktUuid){
  char *zTag = mprintf("tkt-%s", zTktUuid);
  int tagid = tag_findid(zTag, 1);
  Stmt q;
  Manifest *pTicket;
  int createFlag = 1;
  

  db_multi_exec(
     "DELETE FROM ticket WHERE tkt_uuid=%Q", zTktUuid
  );
  db_prepare(&q, "SELECT rid FROM tagxref WHERE tagid=%d ORDER BY mtime",tagid);
  while( db_step(&q)==SQLITE_ROW ){
    int rid = db_column_int(&q, 0);
    pTicket = manifest_get(rid, CFTYPE_TICKET);







|
>







214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
*/
void ticket_rebuild_entry(const char *zTktUuid){
  char *zTag = mprintf("tkt-%s", zTktUuid);
  int tagid = tag_findid(zTag, 1);
  Stmt q;
  Manifest *pTicket;
  int createFlag = 1;

  fossil_free(zTag);  
  db_multi_exec(
     "DELETE FROM ticket WHERE tkt_uuid=%Q", zTktUuid
  );
  db_prepare(&q, "SELECT rid FROM tagxref WHERE tagid=%d ORDER BY mtime",tagid);
  while( db_step(&q)==SQLITE_ROW ){
    int rid = db_column_int(&q, 0);
    pTicket = manifest_get(rid, CFTYPE_TICKET);

Changes to src/wikiformat.c.

1732
1733
1734
1735
1736
1737
1738

1739
      }
      default: {
        break;
      }
    }
    z += n;
  }

}







>

1732
1733
1734
1735
1736
1737
1738
1739
1740
      }
      default: {
        break;
      }
    }
    z += n;
  }
  free(renderer.aStack);
}