From 07c87b82fff5a8e19eadad64e6ee4c0b6e4e1026 Mon Sep 17 00:00:00 2001 From: Russell Bryant Date: Wed, 11 May 2005 03:07:39 +0000 Subject: [PATCH] only unlock hintlock once (bug #4205) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@5622 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- pbx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pbx.c b/pbx.c index 45701dce22..8c09494f2a 100755 --- a/pbx.c +++ b/pbx.c @@ -1515,11 +1515,12 @@ int ast_extension_state_add(char *context, char *exten, if (cblist->callback == callback) { cblist->data = data; ast_mutex_unlock(&hintlock); + return 0; } cblist = cblist->next; } - /* Now inserts the callback */ + /* Now insert the callback */ cblist = malloc(sizeof(struct ast_state_cb)); if (!cblist) { ast_mutex_unlock(&hintlock); -- 2.47.2