Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
libsepol/cil: Set class field to NULL when resetting struct cil_class…
…perms

The class field of a struct cil_classperms points to the class looked
up in the symbol table, so that field should be set to NULL when
the cil_classperms is reset.

Set the class field to NULL when resetting the struct cil_classperms.

Signed-off-by: James Carter <jwcart2@gmail.com>
  • Loading branch information
jwcart2 committed Apr 19, 2021
1 parent c49a8ea commit a7a80ef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libsepol/cil/src/cil_reset_ast.c
Expand Up @@ -45,6 +45,7 @@ static inline void cil_reset_classperms(struct cil_classperms *cp)
return;
}

cp->class = NULL;
cil_list_destroy(&cp->perms, CIL_FALSE);
}

Expand Down

0 comments on commit a7a80ef

Please sign in to comment.