Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pillar/zedagent: prevent possible crash if 'locConfig' is set to nil #3114

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

rouming
Copy link
Contributor

@rouming rouming commented Mar 22, 2023

There is a possible race between checking the locConfig variable and passing it to the function which does not expect nil.

This patch fixes possible crash if config re-fetched, locConfig is set to nil but goroutine was scheduled for execution.

To prevent a crash use cached value.

There is a possible race between checking the locConfig variable
and passing it to the function which does not expect nil.

This patch fixes possible crash if config re-fetched, locConfig is
set to nil but goroutine was scheduled for execution.

To prevent a crash use cached value.

Signed-off-by: Roman Penyaev <r.peniaev@gmail.com>
Copy link
Contributor

@eriknordmark eriknordmark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eriknordmark eriknordmark merged commit d1a7dc5 into lf-edge:master Mar 23, 2023
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