From da8aca2f61c92f2333eccbbbf362ccf5518bcd3d Mon Sep 17 00:00:00 2001 From: markster Date: Wed, 20 Oct 2004 04:27:31 +0000 Subject: Fix potential segfault. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4037 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_meetme.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'apps/app_meetme.c') diff --git a/apps/app_meetme.c b/apps/app_meetme.c index 203678df9..e853dc87e 100755 --- a/apps/app_meetme.c +++ b/apps/app_meetme.c @@ -1464,14 +1464,17 @@ static int admin_exec(struct ast_channel *chan, void *data) { command = strsep(¶ms, "|"); caller = strsep(¶ms, "|"); - ast_mutex_lock(&conflock); + if (!command) { + ast_log(LOG_WARNING, "MeetmeAdmin requires a command!\n"); + ast_mutex_unlock(&conflock); + return -1; + } cnf = confs; while (cnf) { if (strcmp(cnf->confno, conf) == 0) break; cnf = cnf->next; } - ast_mutex_unlock(&conflock); if (caller) user = find_user(cnf, caller); -- cgit v1.2.3