mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 04:11:08 +00:00
core: Disable astobj2 locking for some common objects.
* ACO options * Indications * Module loader ref_debug object * Media index info and variants * xmldoc items These allocation locations were identified using reflocks.py on the master branch. Change-Id: Ie999b9941760be3d1946cdb6e30cb85fd97504d8
This commit is contained in:
@@ -222,7 +222,8 @@ int aco_option_register_deprecated(struct aco_info *info, const char *name, stru
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!(opt = ao2_alloc(sizeof(*opt), config_option_destroy))) {
|
||||
opt = ao2_alloc_options(sizeof(*opt), config_option_destroy, AO2_ALLOC_OPT_LOCK_NOLOCK);
|
||||
if (!opt) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -313,7 +314,9 @@ int __aco_option_register(struct aco_info *info, const char *name, enum aco_matc
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!(opt = ao2_alloc(sizeof(*opt) + argc * sizeof(opt->args[0]), config_option_destroy))) {
|
||||
opt = ao2_alloc_options(sizeof(*opt) + argc * sizeof(opt->args[0]),
|
||||
config_option_destroy, AO2_ALLOC_OPT_LOCK_NOLOCK);
|
||||
if (!opt) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user