summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <[email protected]>2015-05-22 10:01:50 +0200
committerPatrick Steinhardt <[email protected]>2015-05-22 10:01:50 +0200
commite8531dd5c31fc87044e9061b18f37df9b05bd0ac (patch)
tree62b2ffe5ef7c32f89a49bb722c1cce85b2a9656b
parentc43afaf9c4f5abb7ded44d88c8e9e290f61362fd (diff)
diff: only untrack notify payload when it is set
-rw-r--r--diff.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/diff.go b/diff.go
index 8aa79aa..5e03175 100644
--- a/diff.go
+++ b/diff.go
@@ -561,7 +561,9 @@ func freeDiffOptions(copts *C.git_diff_options) {
freeStrarray(&cpathspec)
C.free(unsafe.Pointer(copts.old_prefix))
C.free(unsafe.Pointer(copts.new_prefix))
- pointerHandles.Untrack(copts.notify_payload)
+ if copts.notify_payload != nil {
+ pointerHandles.Untrack(copts.notify_payload)
+ }
}
}