Skip to content

Commit

Permalink
Free up resources after the command is done
Browse files Browse the repository at this point in the history
  • Loading branch information
codersrankOrg committed Jul 21, 2022
1 parent a045c89 commit c0d965d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions extractor/extractor.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,9 @@ func (r *RepoExtractor) commitWorker(w int, jobs <-chan *req, results chan<- []*
fmt.Println("Error during execution of Git command.")
return err
}
defer func(c *exec.Cmd) {
c.Wait()
}(cmd)

// parse the output into stats
scanner := bufio.NewScanner(stdout)
Expand Down

0 comments on commit c0d965d

Please sign in to comment.