[asterisk-commits] dlee: trunk r399101 - in /trunk: ./ main/astobj2.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Sep 13 15:55:11 CDT 2013
Author: dlee
Date: Fri Sep 13 15:55:09 2013
New Revision: 399101
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=399101
Log:
Don't write to /tmp/refs when REF_DEBUG is not defined.
If MALLOC_DEBUG is enabled, then the debug destructor for the container
is used, which would erroneously write to /tmp/refs. This patch only
uses the debug destructor if ref_debug is used.
(closes issue ASTERISK-22536)
........
Merged revisions 399098 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 399099 from http://svn.asterisk.org/svn/asterisk/branches/11
........
Merged revisions 399100 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/main/astobj2.c
Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Fri Sep 13 15:55:09 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398558,398560-398577,398579-399049,399059,399064,399083
+/branches/12:1-398558,398560-398577,398579-399100
Modified: trunk/main/astobj2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/astobj2.c?view=diff&rev=399101&r1=399100&r2=399101
==============================================================================
--- trunk/main/astobj2.c (original)
+++ trunk/main/astobj2.c Fri Sep 13 15:55:09 2013
@@ -3190,7 +3190,8 @@
num_buckets = hash_fn ? n_buckets : 1;
container_size = sizeof(struct ao2_container_hash) + num_buckets * sizeof(struct hash_bucket);
- self = __ao2_alloc_debug(container_size, container_destruct_debug, ao2_options,
+ self = __ao2_alloc_debug(container_size,
+ ref_debug ? container_destruct_debug : container_destruct, ao2_options,
tag, file, line, func, ref_debug);
return hash_ao2_container_init(self, container_options, num_buckets, hash_fn,
sort_fn, cmp_fn);
@@ -5337,7 +5338,8 @@
return NULL;
}
- self = __ao2_alloc_debug(sizeof(*self), container_destruct_debug, ao2_options,
+ self = __ao2_alloc_debug(sizeof(*self),
+ ref_debug ? container_destruct_debug : container_destruct, ao2_options,
tag, file, line, func, ref_debug);
return rb_ao2_container_init(self, container_options, sort_fn, cmp_fn);
}
More information about the asterisk-commits
mailing list