diff: only untrack notify payload when it is set

This commit is contained in:
Patrick Steinhardt 2015-05-22 10:01:50 +02:00
parent c43afaf9c4
commit e8531dd5c3
1 changed files with 3 additions and 1 deletions

View File

@ -561,8 +561,10 @@ func freeDiffOptions(copts *C.git_diff_options) {
freeStrarray(&cpathspec) freeStrarray(&cpathspec)
C.free(unsafe.Pointer(copts.old_prefix)) C.free(unsafe.Pointer(copts.old_prefix))
C.free(unsafe.Pointer(copts.new_prefix)) C.free(unsafe.Pointer(copts.new_prefix))
if copts.notify_payload != nil {
pointerHandles.Untrack(copts.notify_payload) pointerHandles.Untrack(copts.notify_payload)
} }
}
} }
func (v *Repository) DiffTreeToTree(oldTree, newTree *Tree, opts *DiffOptions) (*Diff, error) { func (v *Repository) DiffTreeToTree(oldTree, newTree *Tree, opts *DiffOptions) (*Diff, error) {