From 856778de69999a4321d54f2cefef66d3e2fce4c1 Mon Sep 17 00:00:00 2001 From: file Date: Mon, 17 Dec 2007 22:28:09 +0000 Subject: 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: http://svn.digium.com/svn/asterisk/branches/1.4@93377 f38db490-d61c-443f-a65b-d21fe96a405b --- main/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main/utils.c') diff --git a/main/utils.c b/main/utils.c index e464f7284..db08c03e5 100644 --- a/main/utils.c +++ b/main/utils.c @@ -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 */ -- cgit v1.2.3