[Asterisk-code-review] Fix potential crash after unload of func periodic hook or te... (asterisk[13])

Corey Farrell asteriskteam at digium.com
Thu May 14 05:41:22 CDT 2015


Corey Farrell has uploaded a new patch set (#2).

Change subject: Fix potential crash after unload of func_periodic_hook or test_message.
......................................................................

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
---
M funcs/func_periodic_hook.c
M tests/test_message.c
2 files changed, 4 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/67/467/2
-- 
To view, visit https://gerrit.asterisk.org/467
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6a00ec8e38046058f97dc703e1adcde9bf517835
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>



More information about the asterisk-code-review mailing list