2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-29 13:28:10 +00:00

free_parse_tree: clear the nss pointer when freeing.

This commit is contained in:
Todd C. Miller 2023-08-18 12:24:00 -06:00
parent a712af5a26
commit 1b9fb405a3
2 changed files with 2 additions and 0 deletions

View File

@ -3974,6 +3974,7 @@ free_parse_tree(struct sudoers_parse_tree *parse_tree)
if (parse_tree->shost != parse_tree->lhost) if (parse_tree->shost != parse_tree->lhost)
free(parse_tree->shost); free(parse_tree->shost);
parse_tree->lhost = parse_tree->shost = NULL; parse_tree->lhost = parse_tree->shost = NULL;
parse_tree->nss = NULL;
} }
/* /*

View File

@ -1791,6 +1791,7 @@ free_parse_tree(struct sudoers_parse_tree *parse_tree)
if (parse_tree->shost != parse_tree->lhost) if (parse_tree->shost != parse_tree->lhost)
free(parse_tree->shost); free(parse_tree->shost);
parse_tree->lhost = parse_tree->shost = NULL; parse_tree->lhost = parse_tree->shost = NULL;
parse_tree->nss = NULL;
} }
/* /*