Index: main/pbx.c =================================================================== --- main/pbx.c (revision 313184) +++ main/pbx.c (working copy) @@ -4266,13 +4266,13 @@ /* Device state changed since last check - notify the watchers */ + ao2_lock(hint); ao2_lock(hints); - ao2_lock(hint); if (hint->exten == NULL) { /* the extension has been destroyed */ + ao2_unlock(hints); ao2_unlock(hint); - ao2_unlock(hints); continue; } @@ -4291,8 +4291,8 @@ ao2_iterator_destroy(&cb_iter); hint->laststate = state; /* record we saw the change */ + ao2_unlock(hints); ao2_unlock(hint); - ao2_unlock(hints); } ao2_iterator_destroy(&i); ast_free(str);