mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
issue #5685
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7057 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
2005-11-10 Kevin P. Fleming <kpfleming@digium.com>
|
2005-11-10 Kevin P. Fleming <kpfleming@digium.com>
|
||||||
|
|
||||||
|
* channels/chan_iax2.c (complete_iax2_show_peer): don't return from function without releasing lock (issue #5685)
|
||||||
|
|
||||||
* channels/iax2-provision.c (iax_provision_reload): don't leak memory (issue #5700)
|
* channels/iax2-provision.c (iax_provision_reload): don't leak memory (issue #5700)
|
||||||
|
|
||||||
* pbx/pbx_ael.c (handle_macro): don't leak memory (issue #5701)
|
* pbx/pbx_ael.c (handle_macro): don't leak memory (issue #5701)
|
||||||
|
@@ -1970,6 +1970,7 @@ static char *complete_iax2_show_peer(char *line, char *word, int pos, int state)
|
|||||||
{
|
{
|
||||||
int which = 0;
|
int which = 0;
|
||||||
struct iax2_peer *p;
|
struct iax2_peer *p;
|
||||||
|
char *res = NULL;
|
||||||
|
|
||||||
/* 0 - iax2; 1 - show; 2 - peer; 3 - <peername> */
|
/* 0 - iax2; 1 - show; 2 - peer; 3 - <peername> */
|
||||||
if(pos == 3) {
|
if(pos == 3) {
|
||||||
@@ -1977,14 +1978,15 @@ static char *complete_iax2_show_peer(char *line, char *word, int pos, int state)
|
|||||||
for(p = peerl.peers ; p ; p = p->next) {
|
for(p = peerl.peers ; p ; p = p->next) {
|
||||||
if(!strncasecmp(p->name, word, strlen(word))) {
|
if(!strncasecmp(p->name, word, strlen(word))) {
|
||||||
if(++which > state) {
|
if(++which > state) {
|
||||||
return strdup(p->name);
|
res = strdup(p->name);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ast_mutex_unlock(&peerl.lock);
|
ast_mutex_unlock(&peerl.lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int iax2_show_stats(int fd, int argc, char *argv[])
|
static int iax2_show_stats(int fd, int argc, char *argv[])
|
||||||
|
Reference in New Issue
Block a user