More memory wrapper cleanup. #6224

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
BJ Weschke
2006-01-13 03:34:31 +00:00
parent 8637b23569
commit f6c5e65266
6 changed files with 22 additions and 24 deletions

View File

@@ -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;
}