aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_smdi.c
diff options
context:
space:
mode:
authorseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-15 18:21:50 +0000
committerseanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b>2010-01-15 18:21:50 +0000
commitadc69e041d2b415b3422672fb262423808dfa8ab (patch)
treeede1629dadd9e525779f3da8f54510a9dd1ea081 /res/res_smdi.c
parenta79e0451bce168a451e7ed1e30226166e58e203c (diff)
Convert a few places to use ast_calloc_with_stringfields where applicable.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@240368 f38db490-d61c-443f-a65b-d21fe96a405b
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);