summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2008-06-04 22:07:37 +0000
committerMark Michelson <mmichelson@digium.com>2008-06-04 22:07:37 +0000
commit4b1fae3efbe4f7979b9f412265e50d0531315be8 (patch)
tree1896514080ad95485da9c58ed3d0c0081dc87370 /apps
parent12cf254253e33052c3942fdfa7dbdab90b9f5708 (diff)
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: https://origsvn.digium.com/svn/asterisk/trunk@120514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-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 bbeb43ef0..0efbbca8a 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -5957,10 +5957,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);
}