Fossil SCM
The return value from sqlite3_win32_mbcs_to_utf8 and sqlite3_win32_utf8_to_mbcs must now be freed via sqlite3_free.
Commit
058e287edbef8941c4a7ebfd1e93194ed846aa0b
Parent
a3e625e954d0c78…
1 file changed
+2
-1
+2
-1
| --- src/file.c | ||
| +++ src/file.c | ||
| @@ -997,11 +997,12 @@ | ||
| 997 | 997 | ** Translate MBCS to UTF8. Return a pointer. Call fossil_mbcs_free() |
| 998 | 998 | ** to deallocate any memory used to store the returned pointer when done. |
| 999 | 999 | */ |
| 1000 | 1000 | void fossil_mbcs_free(char *zOld){ |
| 1001 | 1001 | #ifdef _WIN32 |
| 1002 | - free(zOld); | |
| 1002 | + extern void sqlite3_free(void*); | |
| 1003 | + sqlite3_free(zOld); | |
| 1003 | 1004 | #else |
| 1004 | 1005 | /* No-op on unix */ |
| 1005 | 1006 | #endif |
| 1006 | 1007 | } |
| 1007 | 1008 | |
| 1008 | 1009 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -997,11 +997,12 @@ | |
| 997 | ** Translate MBCS to UTF8. Return a pointer. Call fossil_mbcs_free() |
| 998 | ** to deallocate any memory used to store the returned pointer when done. |
| 999 | */ |
| 1000 | void fossil_mbcs_free(char *zOld){ |
| 1001 | #ifdef _WIN32 |
| 1002 | free(zOld); |
| 1003 | #else |
| 1004 | /* No-op on unix */ |
| 1005 | #endif |
| 1006 | } |
| 1007 | |
| 1008 |
| --- src/file.c | |
| +++ src/file.c | |
| @@ -997,11 +997,12 @@ | |
| 997 | ** Translate MBCS to UTF8. Return a pointer. Call fossil_mbcs_free() |
| 998 | ** to deallocate any memory used to store the returned pointer when done. |
| 999 | */ |
| 1000 | void fossil_mbcs_free(char *zOld){ |
| 1001 | #ifdef _WIN32 |
| 1002 | extern void sqlite3_free(void*); |
| 1003 | sqlite3_free(zOld); |
| 1004 | #else |
| 1005 | /* No-op on unix */ |
| 1006 | #endif |
| 1007 | } |
| 1008 | |
| 1009 |