Description
This was noted in comments in the source, but when setting sqlite3_temp_directory the old value will be leaked. The assumption was that this method would not be called more than once, so if that assumption is not true then one of two things needs to happen:
1. Free the old value before resetting (probably dangerous, according to SQLite documentation, but the dangerous part of changing it while operations are ongoing is probably already happening)
2. Only set the value if it currently contains null