libsepol: fix memory leak when destroying avtab containing extended avrules
Signed-off-by: Steve Lawrence <slawrence@tresys.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
This commit is contained in:
parent
e93f755bf7
commit
011da992da
1 changed files with 3 additions and 0 deletions
|
@ -309,6 +309,9 @@ void avtab_destroy(avtab_t * h)
|
|||
for (i = 0; i < h->nslot; i++) {
|
||||
cur = h->htable[i];
|
||||
while (cur != NULL) {
|
||||
if (cur->key.specified & AVTAB_XPERMS) {
|
||||
free(cur->datum.xperms);
|
||||
}
|
||||
temp = cur;
|
||||
cur = cur->next;
|
||||
free(temp);
|
||||
|
|
Loading…
Reference in a new issue