diff options
author | bweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-13 03:34:31 +0000 |
---|---|---|
committer | bweschke <bweschke@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-13 03:34:31 +0000 |
commit | 589c3c0044b532cde995c7339a04714128a61d73 (patch) | |
tree | 4c1811d4204404d6e76227a772b535cb8ad0c154 /apps/app_parkandannounce.c | |
parent | bb26a9138e13c01ab7fba613854fabb788341d45 (diff) |
More memory wrapper cleanup. #6224
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8045 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_parkandannounce.c')
-rw-r--r-- | apps/app_parkandannounce.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/app_parkandannounce.c b/apps/app_parkandannounce.c index 749990afc..91afdfe2b 100644 --- a/apps/app_parkandannounce.c +++ b/apps/app_parkandannounce.c @@ -49,6 +49,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/logger.h" #include "asterisk/say.h" #include "asterisk/lock.h" +#include "asterisk/utils.h" static char *tdesc = "Call Parking and Announce Application"; @@ -94,10 +95,8 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data) LOCAL_USER_ADD(u); - l=strlen(data)+2; - orig_s=malloc(l); - if(!orig_s) { - ast_log(LOG_WARNING, "Out of memory\n"); + l=strlen(data)+2; + if (!(orig_s = ast_malloc(l))) { LOCAL_USER_REMOVE(u); return -1; } |