]> git.ipfire.org Git - thirdparty/asterisk.git/commit
astdb: crash in sqlite3 during shutdown
authorScott Griepentrog <sgriepentrog@digium.com>
Thu, 19 Dec 2013 16:31:57 +0000 (16:31 +0000)
committerScott Griepentrog <sgriepentrog@digium.com>
Thu, 19 Dec 2013 16:31:57 +0000 (16:31 +0000)
commit294b65e9e4dc39389ead6d063bc411e19f805092
tree4c8e9c9f8fe0b38ef25f577b6b89ffb8fbe216a0
parentbe58afd8df9676d3d69aa613d07e193d4b22b12f
astdb: crash in sqlite3 during shutdown

When Asterisk is shut down, the astdb_atexit() function releases
(finalize) the previously initiated (prepared) SQL statements in
sqlite3.  Another thread making a subsequent request can cause a
crash in sqlite3.  This patch eliminates that issue by resetting
the statement pointer after it is released/cleared.  The sqlite3
code detects the null pointer, and aborts the operation cleanly.

(closes issue AST-1265)
Reported by: Alexander Hömig
(closes issue ASTERISK-22350)
Reported by: Birger "WIMPy" Harzenetter
Review: https://reviewboard.asterisk.org/r/3078/
........

Merged revisions 404344 from http://svn.asterisk.org/svn/asterisk/branches/11

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