]> granicus.if.org Git - sudo/commitdiff
plug memory leaks
authorTodd C. Miller <Todd.Miller@sudo.ws>
Wed, 28 Feb 2018 21:02:11 +0000 (14:02 -0700)
committerTodd C. Miller <Todd.Miller@sudo.ws>
Wed, 28 Feb 2018 21:02:11 +0000 (14:02 -0700)
plugins/sudoers/cvtsudoers_ldif.c

index c8648d0921dcd4542508d89123a44b5484f03cd0..153dc8274d47b7845f5db5c385113208be5eef7d 100644 (file)
@@ -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));