Fix memory leaks in NewIndex() and OpenIndex() #268

Merged
ryot4 merged 1 commits from fix-index-leaks into master 2015-10-29 07:04:01 -05:00
1 changed files with 2 additions and 2 deletions

View File

@ -97,7 +97,7 @@ func NewIndex() (*Index, error) {
return nil, MakeGitError(err) return nil, MakeGitError(err)
} }
return &Index{ptr: ptr}, nil return newIndexFromC(ptr), nil
} }
// OpenIndex creates a new index at the given path. If the file does // OpenIndex creates a new index at the given path. If the file does
@ -115,7 +115,7 @@ func OpenIndex(path string) (*Index, error) {
return nil, MakeGitError(err) return nil, MakeGitError(err)
} }
return &Index{ptr: ptr}, nil return newIndexFromC(ptr), nil
} }
// Path returns the index' path on disk or an empty string if it // Path returns the index' path on disk or an empty string if it