libsepol/cil: Set class field to NULL when resetting struct cil_classperms

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>
This commit is contained in:
James Carter 2021-04-08 13:32:08 -04:00
parent c49a8ea095
commit a7a80ef51b

View File

@ -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);
}