Skip to content

Commit e8531dd

Browse files
committed
diff: only untrack notify payload when it is set
1 parent c43afaf commit e8531dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

diff.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -561,7 +561,9 @@ func freeDiffOptions(copts *C.git_diff_options) {
561561
freeStrarray(&cpathspec)
562562
C.free(unsafe.Pointer(copts.old_prefix))
563563
C.free(unsafe.Pointer(copts.new_prefix))
564-
pointerHandles.Untrack(copts.notify_payload)
564+
if copts.notify_payload != nil {
565+
pointerHandles.Untrack(copts.notify_payload)
566+
}
565567
}
566568
}
567569

0 commit comments

Comments
 (0)