diff options
Diffstat (limited to 'apps/app_osplookup.c')
-rw-r--r-- | apps/app_osplookup.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/app_osplookup.c b/apps/app_osplookup.c index 18091e5c5..af9bf9877 100644 --- a/apps/app_osplookup.c +++ b/apps/app_osplookup.c @@ -139,6 +139,11 @@ static int osplookup_exec(struct ast_channel *chan, void *data) LOCAL_USER_ADD(u); temp = ast_strdupa(data); + if (!temp) { + ast_log(LOG_ERROR, "Out of memory!\n"); + LOCAL_USER_REMOVE(u); + return -1; + } AST_STANDARD_APP_ARGS(args, temp); @@ -197,6 +202,11 @@ static int ospnext_exec(struct ast_channel *chan, void *data) LOCAL_USER_ADD(u); temp = ast_strdupa(data); + if (!temp) { + ast_log(LOG_ERROR, "Out of memory!\n"); + LOCAL_USER_REMOVE(u); + return -1; + } AST_STANDARD_APP_ARGS(args, temp); @@ -266,6 +276,11 @@ static int ospfinished_exec(struct ast_channel *chan, void *data) LOCAL_USER_ADD(u); temp = ast_strdupa(data); + if (!temp) { + ast_log(LOG_ERROR, "Out of memory!\n"); + LOCAL_USER_REMOVE(u); + return -1; + } AST_STANDARD_APP_ARGS(args, temp); |