aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_random.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_random.c')
-rw-r--r--apps/app_random.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/apps/app_random.c b/apps/app_random.c
index f7d09e87a..b533166af 100644
--- a/apps/app_random.c
+++ b/apps/app_random.c
@@ -73,9 +73,7 @@ static int random_exec(struct ast_channel *chan, void *data)
LOCAL_USER_ADD(u);
- s = ast_strdupa(data);
- if (!s) {
- ast_log(LOG_ERROR, "Out of memory!\n");
+ if (!(s = ast_strdupa(data))) {
LOCAL_USER_REMOVE(u);
return -1;
}