aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_queue.c
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-04 22:08:09 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2008-06-04 22:08:09 +0000
commitf7508c7eb9e37ca4a03cf8c4dbaf9e1f4b399c50 (patch)
tree91ca555e589bd5caa28069c219223712d4184c1e /apps/app_queue.c
parentff3eafe2b2994a0252eca6f9eb6b5dc1173a8438 (diff)
Merged revisions 120514 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ................ r120514 | mmichelson | 2008-06-04 17:07:37 -0500 (Wed, 04 Jun 2008) | 14 lines Merged revisions 120513 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r120513 | mmichelson | 2008-06-04 17:05:33 -0500 (Wed, 04 Jun 2008) | 6 lines 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.6.0@120515 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_queue.c')
-rw-r--r--apps/app_queue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 402c910fa..2c5375fc4 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -5894,10 +5894,10 @@ static char *complete_queue_remove_member(const char *line, const char *word, in
if (!strncasecmp(word, m->membername, wordlen) && ++which > state) {
char *tmp;
ao2_unlock(q);
- tmp = m->interface;
+ tmp = ast_strdup(m->interface);
ao2_ref(m, -1);
queue_unref(q);
- return ast_strdup(tmp);
+ return tmp;
}
ao2_ref(m, -1);
}