Merged revisions 84637 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Thu, 4 Oct 2007 14:54:30 +0000 (14:54 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 4 Oct 2007 14:54:30 +0000 (14:54 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r84637 | file | 2007-10-04 11:51:57 -0300 (Thu, 04 Oct 2007) | 4 lines

Create a duplicate of the channel's member name as the tab completion stuff will free it.
(closes issue #10884)
Reported by: adamg

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84638 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_queue.c

index 9470b44..b2078c6 100644 (file)
@@ -4824,7 +4824,7 @@ static char *complete_queue_remove_member(const char *line, const char *word, in
                                tmp = m->membername;
                                ao2_ref(m, -1);
                                queue_unref(q);
-                               return tmp;
+                               return ast_strdup(tmp);
                        }
                        ao2_ref(m, -1);
                }