diff options
Diffstat (limited to 'apps/app_read.c')
-rw-r--r-- | apps/app_read.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/app_read.c b/apps/app_read.c index eaa9cfdd2..ef7f183ad 100644 --- a/apps/app_read.c +++ b/apps/app_read.c @@ -118,6 +118,11 @@ static int read_exec(struct ast_channel *chan, void *data) LOCAL_USER_ADD(u); argcopy = ast_strdupa(data); + if (!argcopy) { + ast_log(LOG_ERROR, "Out of memory!\n"); + LOCAL_USER_REMOVE(u); + return -1; + } AST_STANDARD_APP_ARGS(arglist, argcopy); |