]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
And don't forget to return on the error condition
authorMark Michelson <mmichelson@digium.com>
Thu, 16 Oct 2008 23:35:07 +0000 (23:35 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 16 Oct 2008 23:35:07 +0000 (23:35 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@150301 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/manager.c

index 98f7a61f12a98b82f67df19ed2fc397be947ae9d..21c76c212fb9c2003b5647ce770a2e51c0f7b3e0 100644 (file)
@@ -1501,6 +1501,7 @@ static int action_getvar(struct mansession *s, const struct message *m)
                char *copy = ast_strdupa(varname);
                if (!c) {
                        astman_send_error(s, m, "No such channel");
+                       return 0;
                }
                ast_func_read(c, copy, workspace, sizeof(workspace));
                varval = workspace;