diff options
author | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-04 22:05:33 +0000 |
---|---|---|
committer | mmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-06-04 22:05:33 +0000 |
commit | a5b32044b586d19f2710687603292f9d415b29fc (patch) | |
tree | 7dd492c46c59b6bbcd65facb916909e510286823 /apps | |
parent | 298c626e8d4580b02c2c528188d3a1754cc6c541 (diff) |
Make sure that the string we set will survive the unref of
the queue member.
Thanks to Russell, who pointed this out.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@120513 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_queue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c index 18b2cd9f9..01fdcf3aa 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -4815,9 +4815,9 @@ static char *complete_queue_remove_member(const char *line, const char *word, in if (++which > state) { char *tmp; ast_mutex_unlock(&q->lock); - tmp = m->interface; + tmp = ast_strdup(m->interface); ao2_ref(m, -1); - return ast_strdup(tmp); + return tmp; } ao2_ref(m, -1); } |