[asterisk-commits] coreyfarrell: branch 13 r426807 - in /branches/13: ./ apps/app_queue.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Oct 30 18:55:37 CDT 2014
Author: coreyfarrell
Date: Thu Oct 30 18:55:34 2014
New Revision: 426807
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=426807
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/
........
Merged revisions 426805 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 426806 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
branches/13/ (props changed)
branches/13/apps/app_queue.c
Propchange: branches/13/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.
Modified: branches/13/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/apps/app_queue.c?view=diff&rev=426807&r1=426806&r2=426807
==============================================================================
--- branches/13/apps/app_queue.c (original)
+++ branches/13/apps/app_queue.c Thu Oct 30 18:55:34 2014
@@ -113,9 +113,6 @@
#include "asterisk/mixmonitor.h"
#include "asterisk/core_unreal.h"
#include "asterisk/bridge_basic.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.
@@ -1776,7 +1773,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__)
@@ -7225,6 +7222,7 @@
if ((q = find_load_queue_rt_friendly(name))) {
foundqueue++;
foundinterface += set_member_value_help_members(q, interface, property, value);
+ queue_unref(q);
}
}
}
@@ -7235,12 +7233,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);
}
}
More information about the asterisk-commits
mailing list