mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
Do not try to access information about a lock when printing out a trylock attempt. It is possible for the lock that it references to no longer be valid. This would have caused segfaults or deadlocks.
(issue #BE-263) (closes issue #11080) Reported by: callguy (closes issue #11100) Reported by: callguy git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -740,7 +740,7 @@ static int handle_show_locks(int fd, int argc, char *argv[])
|
||||
lock_info->locks[i].lock_addr,
|
||||
lock_info->locks[i].times_locked);
|
||||
|
||||
if (!lock_info->locks[i].pending)
|
||||
if (!lock_info->locks[i].pending || lock_info->locks[i].pending == -1)
|
||||
continue;
|
||||
|
||||
/* We only have further details for mutexes right now */
|
||||
|
Reference in New Issue
Block a user