2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-29 05:17:54 +00:00

Plug memory leaks in store_sudo_test found by LSAN.

This commit is contained in:
Todd C. Miller 2023-04-25 09:28:34 -06:00
parent b1deffbe5b
commit 8c85fefaee

View File

@ -189,12 +189,14 @@ main(int argc, char *argv[])
next:
lbuf.len = 0;
eventlog_json_free(root);
eventlog_free(evlog);
if (infp != NULL)
fclose(infp);
if (outfp != NULL && outfp != infp)
fclose(outfp);
}
sudo_lbuf_destroy(&lbuf);
if (ntests != 0) {
printf("%s: %d test%s run, %d errors, %d%% success rate\n",