sudoers_policy_main: plug memory leak of iolog_path on error.

This commit is contained in:
Todd C. Miller
2022-12-28 10:50:51 -07:00
parent 8e8a22b8e5
commit b69ffd3479

View File

@@ -853,6 +853,9 @@ done:
if (ret == -1) {
/* Free stashed copy of the environment. */
(void)env_init(NULL);
/* Free locally-allocated strings. */
free(iolog_path);
} else {
/* Store settings to pass back to front-end. */
if (!sudoers_policy_store_result(ret, NewArgv, env_get(), cmnd_umask,