summaryrefslogtreecommitdiff
path: root/main/features.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/features.c')
-rw-r--r--main/features.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/main/features.c b/main/features.c
index 8ba195571..68f2f858a 100644
--- a/main/features.c
+++ b/main/features.c
@@ -1940,14 +1940,9 @@ static struct feature_group* register_group(const char *fgname)
return NULL;
}
- if (!(fg = ast_calloc(1, sizeof(*fg))))
+ if (!(fg = ast_calloc_with_stringfields(1, struct feature_group, 128)))
return NULL;
- if (ast_string_field_init(fg, 128)) {
- ast_free(fg);
- return NULL;
- }
-
ast_string_field_set(fg, gname, fgname);
AST_LIST_INSERT_HEAD(&feature_groups, fg, entry);
@@ -1980,14 +1975,9 @@ static void register_group_feature(struct feature_group *fg, const char *exten,
return;
}
- if (!(fge = ast_calloc(1, sizeof(*fge))))
+ if (!(fge = ast_calloc_with_stringfields(1, struct feature_group_exten, 128)))
return;
- if (ast_string_field_init(fge, 128)) {
- ast_free(fge);
- return;
- }
-
ast_string_field_set(fge, exten, S_OR(exten, feature->exten));
fge->feature = feature;