mirror of https://github.com/asterisk/asterisk
It is not safe to iterate over a macro'd list of ao2 objects, deref them such that the item's destructor is called, and leave them in the list. The list macro to iterate over items requires the item to be a valid allocated object in order to proceed to the next item; with MALLOC_DEBUG on the corruption of the linked list is caught in the crash. This patch fixes the invalid access to free'd memory by removing the ao2 item from the list before de-refing it. Note that this is a backport of r396915 from Asterisk trunk. ........ Merged revisions 396958 from http://svn.asterisk.org/svn/asterisk/branches/1.8 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@396961 65c4cc65-6c06-0410-ace0-fbb531ad65f3changes/61/61/1
parent
7103d3aaed
commit
186a2b171c
Loading…
Reference in new issue