[http://www.sqlite.org/cvstrac/tktview?tn=3251]
The advice in sqlite3_close doc to use sqlite3_next_stmt to close open statements should be more qualified. In my opinion it should be removed completely or suggested as a way of finding open statements if a close fails, but not used to finalize statements.
If the program had not been keeping track of statements then it would leak them anyway. If any extension module or other code is in use then it is quite possible that they have their own prepared statements and so the suggested code would result in a double free. One example module that does this is RTree.
<hr><i>drh added on 2009-10-20 14:24:28:</i><br>
Check-in [f494ed38a8d3fabb7a064ba4a860d5288c5a571b].
|