revert my pass through the tree to remove checks of the result of ast_strdupa
[asterisk/asterisk.git] / apps / app_authenticate.c
index 4625061..b7678a0 100644 (file)
@@ -129,6 +129,11 @@ static int auth_exec(struct ast_channel *chan, void *data)
        }
        
        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);