[svn-commits] mmichelson: branch 1.4 r120513 - /branches/1.4/apps/app_queue.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jun 4 17:05:33 CDT 2008


Author: mmichelson
Date: Wed Jun  4 17:05:33 2008
New Revision: 120513

URL: http://svn.digium.com/view/asterisk?view=rev&rev=120513
Log:
Make sure that the string we set will survive the unref of
the queue member.

Thanks to Russell, who pointed this out.


Modified:
    branches/1.4/apps/app_queue.c

Modified: branches/1.4/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_queue.c?view=diff&rev=120513&r1=120512&r2=120513
==============================================================================
--- branches/1.4/apps/app_queue.c (original)
+++ branches/1.4/apps/app_queue.c Wed Jun  4 17:05:33 2008
@@ -4815,9 +4815,9 @@
 				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);
 			}




More information about the svn-commits mailing list