mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
[bug] - Fix unlocking an unlocked mutex (#1583)
* use correct mutext. * remove unused fxn.
This commit is contained in:
parent
661c6b47b7
commit
5043fc8756
2 changed files with 1 additions and 5 deletions
|
@ -176,10 +176,6 @@ func filterDetectors(filterFunc func(detectors.Detector) bool, input []detectors
|
|||
return output
|
||||
}
|
||||
|
||||
func (e *Engine) setFoundResults() {
|
||||
atomic.StoreUint32(&e.numFoundResults, 1)
|
||||
}
|
||||
|
||||
// HasFoundResults returns true if any results are found.
|
||||
func (e *Engine) HasFoundResults() bool {
|
||||
return atomic.LoadUint32(&e.numFoundResults) > 0
|
||||
|
|
|
@ -65,7 +65,7 @@ func (s *Source) cloneRepo(
|
|||
func (s *Source) getUserAndToken(ctx context.Context, repoURL string, installationClient *github.Client) error {
|
||||
// We never refresh user provided tokens, so if we already have them, we never need to try and fetch them again.
|
||||
s.userMu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
defer s.userMu.Unlock()
|
||||
if s.githubUser == "" || s.githubToken == "" {
|
||||
var err error
|
||||
s.githubUser, s.githubToken, err = s.userAndToken(ctx, installationClient)
|
||||
|
|
Loading…
Reference in a new issue