aboutsummaryrefslogtreecommitdiffstats
path: root/pbx.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-05-08 16:54:53 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-05-08 16:54:53 +0000
commit278f8fd014876376aaf7e63c87266acf1d113ec6 (patch)
treec54d55382da24f51d6b553bfff444e10693ab2aa /pbx.c
parent782295e6d244fa022b22e648499252aeb8c982e2 (diff)
Fix double unlock of hintlock (bug #4205)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5602 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rwxr-xr-xpbx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pbx.c b/pbx.c
index 0f62e5814..b5571aca1 100755
--- a/pbx.c
+++ b/pbx.c
@@ -1919,11 +1919,12 @@ int ast_extension_state_add(const char *context, const 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);