Index: channels/chan_skinny.c =================================================================== --- channels/chan_skinny.c (revision 135054) +++ channels/chan_skinny.c (working copy) @@ -1839,6 +1839,7 @@ if (letohl(req->len > SKINNY_MAX_PACKET) || letohl(req->len < 0)) { ast_log(LOG_WARNING, "transmit_response: the length of the request is out of bounds\n"); + ast_mutex_unlock(&s->lock); return -1; } @@ -2872,7 +2873,7 @@ l->label); } } - AST_LIST_LOCK(&devices); + AST_LIST_UNLOCK(&devices); return CLI_SUCCESS; } @@ -4909,6 +4910,7 @@ } if (!l && !sd) { + AST_LIST_UNLOCK(&devices); return 0; } @@ -6274,6 +6276,7 @@ if(setsockopt(skinnysock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) { ast_log(LOG_ERROR, "Set Socket Options failed: errno %d, %s\n", errno, strerror(errno)); ast_config_destroy(cfg); + ast_mutex_unlock(&netlock); return 0; } if (skinnysock < 0) { @@ -6286,6 +6289,7 @@ close(skinnysock); skinnysock = -1; ast_config_destroy(cfg); + ast_mutex_unlock(&netlock); return 0; } if (listen(skinnysock,DEFAULT_SKINNY_BACKLOG)) { @@ -6295,6 +6299,7 @@ close(skinnysock); skinnysock = -1; ast_config_destroy(cfg); + ast_mutex_unlock(&netlock); return 0; } ast_verb(2, "Skinny listening on %s:%d\n",