Author: coreyfarrell Date: Thu Oct 30 18:53:26 2014 New Revision: 426805 URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=426805 Log: app_queue: fix a couple leaks to struct call_queue in set_member_value
set_member_value has a couple leaks to references in the variable q found through testsuite tests/queues/set_penalty. Also remove the REF_DEBUG_ONLY_QUEUES compiler declaration, this is no longer possible with the updated REF_DEBUG code. ASTERISK-24466 #close Reported by: Corey Farrell Review: https://reviewboard.asterisk.org/r/4125/ Modified: branches/11/apps/app_queue.c Modified: branches/11/apps/app_queue.c URL: http://svnview.digium.com/svn/asterisk/branches/11/apps/app_queue.c?view=diff&rev=426805&r1=426804&r2=426805 ============================================================================== --- branches/11/apps/app_queue.c (original) +++ branches/11/apps/app_queue.c Thu Oct 30 18:53:26 2014 @@ -99,9 +99,6 @@ #include "asterisk/callerid.h" #include "asterisk/cel.h" #include "asterisk/data.h" - -/* Define, to debug reference counts on queues, without debugging reference counts on queue members */ -/* #define REF_DEBUG_ONLY_QUEUES */ /*! * \par Please read before modifying this file. @@ -1495,7 +1492,7 @@ ao2_callback(queue->members, OBJ_NODATA | OBJ_MULTIPLE, queue_member_decrement_followers, &pos); } -#ifdef REF_DEBUG_ONLY_QUEUES +#ifdef REF_DEBUG #define queue_ref(q) _queue_ref(q, "", __FILE__, __LINE__, __PRETTY_FUNCTION__) #define queue_unref(q) _queue_unref(q, "", __FILE__, __LINE__, __PRETTY_FUNCTION__) #define queue_t_ref(q, tag) _queue_ref(q, tag, __FILE__, __LINE__, __PRETTY_FUNCTION__) @@ -6546,6 +6543,7 @@ if ((q = find_load_queue_rt_friendly(name))) { foundqueue++; foundinterface += set_member_value_help_members(q, interface, property, value); + queue_unref(q); } } } @@ -6556,12 +6554,14 @@ while ((q = ao2_t_iterator_next(&queue_iter, "Iterate through queues"))) { foundqueue++; foundinterface += set_member_value_help_members(q, interface, property, value); + queue_unref(q); } ao2_iterator_destroy(&queue_iter); } else { /* We actually have a queuename, so we can just act on the single queue. */ if ((q = find_load_queue_rt_friendly(queuename))) { foundqueue++; foundinterface += set_member_value_help_members(q, interface, property, value); + queue_unref(q); } } -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- svn-commits mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/svn-commits
