]> git.ipfire.org Git - thirdparty/asterisk.git/commit
astdb: crash in sqlite3 during shutdown
authorScott Griepentrog <sgriepentrog@digium.com>
Thu, 19 Dec 2013 16:37:49 +0000 (16:37 +0000)
committerScott Griepentrog <sgriepentrog@digium.com>
Thu, 19 Dec 2013 16:37:49 +0000 (16:37 +0000)
commit981340fa72cfd73d677ea58f4e76db44e98a39be
tree42a522bcd717506e967cffc766fe2b4e1165e734
parentc5c376ce948a67af430a0abad9bcdc99eac1784c
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/certified/branches/11.2@404347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/db.c