Skip to content
Snippets Groups Projects
Commit e8875d5c authored by Jaco Kroon's avatar Jaco Kroon Committed by Friendly Automation
Browse files

func_lock: Fix memory corruption during unload.


AST_TRAVERSE accessess current as current = current->(field).next ...
and since we free current (and ast_free poisons the memory) we either
end up on a ast_mutex_lock to a non-existing lock that can never be
obtained, or a segfault.

Incidentally add logging in the "we have to wait for a lock to release"
case, and remove an ineffective statement that sets memory that was just
cleared by ast_calloc to zero.

Change-Id: Id19ba3d9867b23d0e6783b97e6ecd8e62698b8c3
Signed-off-by: default avatarJaco Kroon <jaco@uls.co.za>
parent caceba79
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment