summaryrefslogtreecommitdiff
path: root/res/res_smdi.c
diff options
context:
space:
mode:
authorSean Bright <sean@malleable.com>2010-01-15 18:21:50 +0000
committerSean Bright <sean@malleable.com>2010-01-15 18:21:50 +0000
commite612d87695ec794059dfe3fc0021bd11a331713d (patch)
treeede1629dadd9e525779f3da8f54510a9dd1ea081 /res/res_smdi.c
parent89413e9ae2d8f0105758c5007313d60c540a8253 (diff)
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
Diffstat (limited to 'res/res_smdi.c')
-rw-r--r--res/res_smdi.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/res/res_smdi.c b/res/res_smdi.c
index 3cb7fa32a..c59bd4afa 100644
--- a/res/res_smdi.c
+++ b/res/res_smdi.c
@@ -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);