-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/4162/#review13721
-----------------------------------------------------------

Ship it!


Ship It!

- Mark Michelson


On Nov. 10, 2014, 2:06 p.m., Joshua Colp wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/4162/
> -----------------------------------------------------------
> 
> (Updated Nov. 10, 2014, 2:06 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-24444
>     https://issues.asterisk.org/jira/browse/ASTERISK-24444
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> When adding an extension it is initially created in the context hash table 
> and also in the pattern tree. This occurs before a priority is added. If 
> afterwards the priority is added and it encounters a failure the entire 
> operation returns an error. In this case the extension is freed but is never 
> removed from the context hash table or the pattern tree. Subsequent access 
> may encounter this invalid extension causing it to access freed memory.
> 
> This change no longer makes add_priority responsible for cleaning up the 
> extension and leaves it up to the caller. The caller now removes the 
> extension from the context hash table and pattern tree and then frees the 
> extension.
> 
> 
> Diffs
> -----
> 
>   /branches/11/main/pbx.c 427541 
> 
> Diff: https://reviewboard.asterisk.org/r/4162/diff/
> 
> 
> Testing
> -------
> 
> Before patch:
> 
> Subscribed to a hint twice - once with no spaces in it, second time with 
> spaces in it. Running in valgrind showed memory access after being freed.
> 
> After patch:
> 
> Subscribed to a hint twice - once with no spaces in it, second time with 
> spaces in it. Running in valgrind showed no memory access issues.
> 
> 
> Thanks,
> 
> Joshua Colp
> 
>

-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-dev

Reply via email to