]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix potential segfault.
authorMark Spencer <markster@digium.com>
Wed, 20 Oct 2004 04:27:31 +0000 (04:27 +0000)
committerMark Spencer <markster@digium.com>
Wed, 20 Oct 2004 04:27:31 +0000 (04:27 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4037 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_meetme.c

index 203678df90403f37bc43a374524786b823d98574..e853dc87ee745507db3f62c76337c3c1a765c6b7 100755 (executable)
@@ -1464,14 +1464,17 @@ static int admin_exec(struct ast_channel *chan, void *data) {
                command = strsep(&params, "|");
                caller = strsep(&params, "|");
                
-               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);