SQLite

View Ticket
Login
Ticket Hash: 860399cc408f2dd5f41aed44bc4d3296f2755ef9
Title: Potential memory leak in sqlite3_bind_text()
Status: Fixed Type: Code_Defect
Severity: Minor Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2010-10-12 02:13:48
Version Found In: 3.7.3
Description:
In the following C interfaces:

  *  sqlite3_bind_blob()
  *  sqlite3_bind_text()
  *  sqlite3_bind_text16()

SQLite promises to take responsibility for invoking the destructor on the
bound string or blob once that string or blob is no longer needed. However,
this sometimes does not happen if the bind interface call itself fails.
For example, the destructor is called on an SQLITE_TOOBIG error but is
omitted on an SQLITE_RANGE error.  The interfaces should be consistent
and always invoke the destructor regardless of the error.