sudo/backport-sudoers_parse_ldif-do-not-free-parse_tree-before-usi.patch
2023-11-28 14:18:43 +08:00

29 lines
1015 B
Diff

From a712af5a26d886d1db88d77575b7998a1944d3a9 Mon Sep 17 00:00:00 2001
From: "Todd C. Miller" <Todd.Miller@sudo.ws>
Date: Fri, 18 Aug 2023 12:22:43 -0600
Subject: [PATCH] sudoers_parse_ldif: do not free parse_tree before using
The user is expected to pass in an initialized and empty parse_tree
so there is no need to free it first.
---
plugins/sudoers/parse_ldif.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/plugins/sudoers/parse_ldif.c b/plugins/sudoers/parse_ldif.c
index a9944171b..98d84488a 100644
--- a/plugins/sudoers/parse_ldif.c
+++ b/plugins/sudoers/parse_ldif.c
@@ -582,9 +582,6 @@ sudoers_parse_ldif(struct sudoers_parse_tree *parse_tree,
int errors = 0;
debug_decl(sudoers_parse_ldif, SUDOERS_DEBUG_UTIL);
- /* Free old contents of the parse tree (if any). */
- free_parse_tree(parse_tree);
-
/*
* We cache user, group and host lists to make it eay to detect when there
* are identical lists (simple pointer compare). This makes it possible
--
2.33.0