From 56bdde13392c8574f615285be70ea648ae456e83 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 28 Feb 2018 14:02:11 -0700 Subject: [PATCH] plug memory leaks --- plugins/sudoers/cvtsudoers_ldif.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/sudoers/cvtsudoers_ldif.c b/plugins/sudoers/cvtsudoers_ldif.c index c8648d092..153dc8274 100644 --- a/plugins/sudoers/cvtsudoers_ldif.c +++ b/plugins/sudoers/cvtsudoers_ldif.c @@ -605,6 +605,7 @@ sudo_role_free(struct sudo_role *role) str_list_free(&role->runasusers); str_list_free(&role->runasgroups); str_list_free(&role->options); + free(role); } debug_return; @@ -879,6 +880,7 @@ parse_ldif(const char *input_file, struct cvtsudoers_config *conf) } } } + free(line); /* Convert from list of roles to array and sort by order. */ role_array = reallocarray(NULL, numroles + 1, sizeof(*role_array)); -- 2.40.0