sudoers_policy_main: plug memory leak of iolog_path on error.
This commit is contained in:
@@ -853,6 +853,9 @@ done:
|
|||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
/* Free stashed copy of the environment. */
|
/* Free stashed copy of the environment. */
|
||||||
(void)env_init(NULL);
|
(void)env_init(NULL);
|
||||||
|
|
||||||
|
/* Free locally-allocated strings. */
|
||||||
|
free(iolog_path);
|
||||||
} else {
|
} else {
|
||||||
/* Store settings to pass back to front-end. */
|
/* Store settings to pass back to front-end. */
|
||||||
if (!sudoers_policy_store_result(ret, NewArgv, env_get(), cmnd_umask,
|
if (!sudoers_policy_store_result(ret, NewArgv, env_get(), cmnd_umask,
|
||||||
|
Reference in New Issue
Block a user