mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
Convert a few places to use ast_calloc_with_stringfields where applicable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@240368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -848,13 +848,8 @@ static void append_mailbox_mapping(struct ast_variable *var, struct ast_smdi_int
|
||||
struct mailbox_mapping *mm;
|
||||
char *mailbox, *context;
|
||||
|
||||
if (!(mm = ast_calloc(1, sizeof(*mm))))
|
||||
if (!(mm = ast_calloc_with_stringfields(1, struct mailbox_mapping, 32)))
|
||||
return;
|
||||
|
||||
if (ast_string_field_init(mm, 32)) {
|
||||
free(mm);
|
||||
return;
|
||||
}
|
||||
|
||||
ast_string_field_set(mm, smdi, var->name);
|
||||
|
||||
|
Reference in New Issue
Block a user