]> git.ipfire.org Git - thirdparty/asterisk.git/commit
Fix potential crash after unload of func_periodic_hook or test_message. 67/467/2
authorCorey Farrell <git@cfware.com>
Thu, 14 May 2015 05:06:53 +0000 (01:06 -0400)
committerCorey Farrell <git@cfware.com>
Thu, 14 May 2015 10:41:22 +0000 (05:41 -0500)
commit6b7282ca4037114ac19da5149dce958f837d1422
tree79b13cc832daf6ba18855ecf68023b63f0950863
parent586da882bc62bd10a46d7da610b18b6c7c290e91
Fix potential crash after unload of func_periodic_hook or test_message.

These modules save a pointer to the context they create on load, and
use that pointer to destroy the context at unload.  It is not safe
to save this pointer, it is replaced during load of pbx_config,
pbx_lua or pbx_ael.

This change causes the modules to pass NULL to ast_context_destroy,
a safer way to perform the unregistration since it does not use
a pointer that could become invalid.

ASTERISK-25085 #close
Reported by: Corey Farrell

Change-Id: I6a00ec8e38046058f97dc703e1adcde9bf517835
funcs/func_periodic_hook.c
tests/test_message.c