mirror of
https://github.com/gosticks/SwiftGit2.git
synced 2025-10-16 11:55:34 +00:00
Fix memory leak
This commit is contained in:
parent
2d0c0765fc
commit
edf555f5b8
@ -348,6 +348,8 @@ final public class Repository {
|
||||
if result != GIT_OK.value {
|
||||
return failure(libGit2Error(result, libGit2PointOfFailure: "git_repository_head"))
|
||||
}
|
||||
return success(referenceWithLibGit2Reference(pointer))
|
||||
let value = referenceWithLibGit2Reference(pointer)
|
||||
git_reference_free(pointer)
|
||||
return success(value)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user