Skip to content

Commit c0d965d

Browse files
committed
Free up resources after the command is done
1 parent a045c89 commit c0d965d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

extractor/extractor.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,9 @@ func (r *RepoExtractor) commitWorker(w int, jobs <-chan *req, results chan<- []*
352352
fmt.Println("Error during execution of Git command.")
353353
return err
354354
}
355+
defer func(c *exec.Cmd) {
356+
c.Wait()
357+
}(cmd)
355358

356359
// parse the output into stats
357360
scanner := bufio.NewScanner(stdout)

0 commit comments

Comments
 (0)