Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Commit

Permalink
veryhigh: add defer to fclose in PyRun_SimpleFile
Browse files Browse the repository at this point in the history
Updates #40.
  • Loading branch information
sbinet committed May 19, 2016
1 parent 8949822 commit 4941be0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions veryhigh.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func PyRun_SimpleFile(filename string) error {
if err != nil || cfile == nil {
return fmt.Errorf("python: could not open %s: %v", filename, err)
}
defer C.fclose(cfile)

retcode := C.PyRun_SimpleFileExFlags(cfile, cfname, 0, nil)
if retcode != 0 {
Expand Down

0 comments on commit 4941be0

Please sign in to comment.