Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
store: Fix SourceConfig.RepoConfig() function call
The SourceConfig pointer may be a loop variable that gets reused. This results in unexpected behavior when the value pointed to is overwritten by the loop calling this function. Includes a test to make sure this is fixed. So, DO NOT point to unsafe variables. Make a new pointer using common.ToPtr where it is passed by value and returns a pointer to that new value. NOTE: This is NOT caught by golangci-lint. There may be other places where this happens, but I have gone through the potential looking code in osbuild-composer and images and not found any (other than a couple places already noted with G601 tags as not a problem).
- Loading branch information
1 parent
a65f17e
commit b786178
Showing
2 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters