summaryrefslogtreecommitdiff
path: root/apps/app_parkandannounce.c
diff options
context:
space:
mode:
authorBJ Weschke <bweschke@btwtech.com>2006-01-13 03:34:31 +0000
committerBJ Weschke <bweschke@btwtech.com>2006-01-13 03:34:31 +0000
commitf6c5e6526689ee0820e3e2495774525691710d65 (patch)
tree4c1811d4204404d6e76227a772b535cb8ad0c154 /apps/app_parkandannounce.c
parent8637b23569d357bcdc155259642ebc979612806e (diff)
More memory wrapper cleanup. #6224
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_parkandannounce.c')
-rw-r--r--apps/app_parkandannounce.c7
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;
}