diff options
author | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-01-15 18:21:50 +0000 |
---|---|---|
committer | seanbright <seanbright@f38db490-d61c-443f-a65b-d21fe96a405b> | 2010-01-15 18:21:50 +0000 |
commit | adc69e041d2b415b3422672fb262423808dfa8ab (patch) | |
tree | ede1629dadd9e525779f3da8f54510a9dd1ea081 /main/pbx.c | |
parent | a79e0451bce168a451e7ed1e30226166e58e203c (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 'main/pbx.c')
-rw-r--r-- | main/pbx.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/main/pbx.c b/main/pbx.c index b9ba3fb79..520e3365b 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -3114,13 +3114,7 @@ int pbx_builtin_raise_exception(struct ast_channel *chan, const char *reason) ds = ast_datastore_alloc(&exception_store_info, NULL); if (!ds) return -1; - exception = ast_calloc(1, sizeof(struct pbx_exception)); - if (!exception) { - ast_datastore_free(ds); - return -1; - } - if (ast_string_field_init(exception, 128)) { - ast_free(exception); + if (!(exception = ast_calloc_with_stringfields(1, struct pbx_exception, 128))) { ast_datastore_free(ds); return -1; } |