]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Properly finalize prepared SQLite3 statements to prevent memory leak
authorMatthew Jordan <mjordan@digium.com>
Sun, 4 Nov 2012 01:13:37 +0000 (01:13 +0000)
committerMatthew Jordan <mjordan@digium.com>
Sun, 4 Nov 2012 01:13:37 +0000 (01:13 +0000)
commita08f48089c6df7169f59aa632b0e92dc978cd42a
treeca5dff8cb555c9c22feceeb07164384763e3a740
parent2427dae7f99c8beda4310215aed31c39b022fd37
Properly finalize prepared SQLite3 statements to prevent memory leak

The AstDB uses prepared SQLite3 statements to retrieve data from the SQLite3
database.  These statements should be finalized during Asterisk shutdown so
that the SQLite3 database can be properly closed.  Failure to finalize the
statements results in a memory leak and a failure when closing the database.

This patch fixes those issues by ensuring that all prepared statements are
properly finalized at shutdown.

(closes issue ASTERISK-20647)
Reported by: Corey Farrell
patches:
  astdb-sqlite3_close.patch uploaded by Corey Farrell (license 5909)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/10@375761 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/db.c