Fossil SCM
Fix harmless memory leaks.
Commit
36babe0ce135122d4028dbb962ee28d2a21ae78e
Parent
a3608700adb54ba…
2 files changed
+1
+1
M
src/db.c
+1
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -1281,10 +1281,11 @@ | ||
| 1281 | 1281 | } |
| 1282 | 1282 | if( db_local_table_exists_but_lacks_column("undo_vfile", "islink") ){ |
| 1283 | 1283 | db_multi_exec("ALTER TABLE undo_vfile ADD COLUMN islink BOOL DEFAULT 0"); |
| 1284 | 1284 | } |
| 1285 | 1285 | } |
| 1286 | + fossil_free(zVFileDef); | |
| 1286 | 1287 | return 1; |
| 1287 | 1288 | } |
| 1288 | 1289 | |
| 1289 | 1290 | /* |
| 1290 | 1291 | ** Locate the root directory of the local repository tree. The root |
| 1291 | 1292 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1281,10 +1281,11 @@ | |
| 1281 | } |
| 1282 | if( db_local_table_exists_but_lacks_column("undo_vfile", "islink") ){ |
| 1283 | db_multi_exec("ALTER TABLE undo_vfile ADD COLUMN islink BOOL DEFAULT 0"); |
| 1284 | } |
| 1285 | } |
| 1286 | return 1; |
| 1287 | } |
| 1288 | |
| 1289 | /* |
| 1290 | ** Locate the root directory of the local repository tree. The root |
| 1291 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1281,10 +1281,11 @@ | |
| 1281 | } |
| 1282 | if( db_local_table_exists_but_lacks_column("undo_vfile", "islink") ){ |
| 1283 | db_multi_exec("ALTER TABLE undo_vfile ADD COLUMN islink BOOL DEFAULT 0"); |
| 1284 | } |
| 1285 | } |
| 1286 | fossil_free(zVFileDef); |
| 1287 | return 1; |
| 1288 | } |
| 1289 | |
| 1290 | /* |
| 1291 | ** Locate the root directory of the local repository tree. The root |
| 1292 |
+1
| --- src/diffcmd.c | ||
| +++ src/diffcmd.c | ||
| @@ -412,10 +412,11 @@ | ||
| 412 | 412 | " ORDER BY pathname /*scan*/", |
| 413 | 413 | vid |
| 414 | 414 | ); |
| 415 | 415 | } |
| 416 | 416 | db_prepare(&q, "%s", blob_sql_text(&sql)); |
| 417 | + blob_reset(&sql); | |
| 417 | 418 | while( db_step(&q)==SQLITE_ROW ){ |
| 418 | 419 | const char *zPathname = db_column_text(&q,0); |
| 419 | 420 | int isDeleted = db_column_int(&q, 1); |
| 420 | 421 | int isChnged = db_column_int(&q,2); |
| 421 | 422 | int isNew = db_column_int(&q,3); |
| 422 | 423 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -412,10 +412,11 @@ | |
| 412 | " ORDER BY pathname /*scan*/", |
| 413 | vid |
| 414 | ); |
| 415 | } |
| 416 | db_prepare(&q, "%s", blob_sql_text(&sql)); |
| 417 | while( db_step(&q)==SQLITE_ROW ){ |
| 418 | const char *zPathname = db_column_text(&q,0); |
| 419 | int isDeleted = db_column_int(&q, 1); |
| 420 | int isChnged = db_column_int(&q,2); |
| 421 | int isNew = db_column_int(&q,3); |
| 422 |
| --- src/diffcmd.c | |
| +++ src/diffcmd.c | |
| @@ -412,10 +412,11 @@ | |
| 412 | " ORDER BY pathname /*scan*/", |
| 413 | vid |
| 414 | ); |
| 415 | } |
| 416 | db_prepare(&q, "%s", blob_sql_text(&sql)); |
| 417 | blob_reset(&sql); |
| 418 | while( db_step(&q)==SQLITE_ROW ){ |
| 419 | const char *zPathname = db_column_text(&q,0); |
| 420 | int isDeleted = db_column_int(&q, 1); |
| 421 | int isChnged = db_column_int(&q,2); |
| 422 | int isNew = db_column_int(&q,3); |
| 423 |