Skip to content

Set command_info to NULL once it is freed#275

Merged
millert merged 1 commit intosudo-project:mainfrom
LumioseSil:emergency
Jun 26, 2023
Merged

Set command_info to NULL once it is freed#275
millert merged 1 commit intosudo-project:mainfrom
LumioseSil:emergency

Conversation

@LumioseSil
Copy link
Copy Markdown
Contributor

The lack of setting to NULL is a holdover from when command_info was a local variable and not a global one. However, we given how other global variables are set to NULL, it is best that we do the same here to avoid potential issues should sudoers_policy_store_result be called again after the first time failed, otherwise we could get a double-free.

The lack of setting to NULL is a holdover from when command_info was a local variable and not a global one. However, we given how other global variables are set to NULL, it is best that we do the same here to avoid potential issues should sudoers_policy_store_result be called again after the first time failed, otherwise we could get a double-free.
@millert millert merged commit a2a8732 into sudo-project:main Jun 26, 2023
@LumioseSil LumioseSil deleted the emergency branch June 26, 2023 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants