aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_externalivr.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-11 22:41:34 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-01-11 22:41:34 +0000
commit9909f9bd4d7afbb49685b706184f22d82505a7ff (patch)
treed4ab39f3172c244d70ca7bfc20e75bccec31b341 /apps/app_externalivr.c
parentf5498b059fb6138859d37da7f3095ef1a1ee1901 (diff)
conversions to memory allocation wrappers (issue #6210)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7991 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_externalivr.c')
-rw-r--r--apps/app_externalivr.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c
index 2cf0858a2..10232044d 100644
--- a/apps/app_externalivr.c
+++ b/apps/app_externalivr.c
@@ -49,6 +49,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/linkedlists.h"
#include "asterisk/app.h"
+#include "asterisk/utils.h"
static const char *tdesc = "External IVR Interface Application";
@@ -112,10 +113,8 @@ static void *gen_alloc(struct ast_channel *chan, void *params)
{
struct localuser *u = params;
struct gen_state *state;
-
- state = calloc(1, sizeof(*state));
-
- if (!state)
+
+ if (!(state = ast_calloc(1, sizeof(*state))))
return NULL;
state->u = u;
@@ -234,10 +233,8 @@ static struct ast_generator gen =
static struct playlist_entry *make_entry(const char *filename)
{
struct playlist_entry *entry;
-
- entry = calloc(1, sizeof(*entry) + strlen(filename) + 10);
-
- if (!entry)
+
+ if (!(entry = ast_calloc(1, sizeof(*entry) + strlen(filename) + 10)))
return NULL;
strcpy(entry->filename, filename);