libsepol/cil: do not dereference args before checking it was not null

Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
Nicolas Iooss 2017-02-27 21:39:31 +01:00 committed by James Carter
parent 3228889620
commit ddaf0afec7

View File

@ -3313,11 +3313,12 @@ int __cil_resolve_ast_node(struct cil_tree_node *node, void *extra_args)
int rc = SEPOL_OK;
struct cil_args_resolve *args = extra_args;
enum cil_pass pass = 0;
struct cil_list *ins = args->in_list;
struct cil_list *ins;
if (node == NULL || args == NULL) {
goto exit;
}
ins = args->in_list;
pass = args->pass;
switch (pass) {