summaryrefslogtreecommitdiff
path: root/patch.go
diff options
context:
space:
mode:
authorJesse Ezell <[email protected]>2014-03-20 23:19:22 -0700
committerJesse Ezell <[email protected]>2014-03-20 23:19:22 -0700
commitaea899e877cd9567fad5a8be7cc2cfb6d8fbb00f (patch)
tree637f25b89a6140c7d9d979d0d3f6162511fdc9a9 /patch.go
parentd78036fe24c9c746d3513f9e97f463f995aef0fd (diff)
set ptr to nil after free
Diffstat (limited to 'patch.go')
-rw-r--r--patch.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/patch.go b/patch.go
index 880f088..d927109 100644
--- a/patch.go
+++ b/patch.go
@@ -31,6 +31,7 @@ func (patch *Patch) Free() error {
}
runtime.SetFinalizer(patch, nil)
C.git_patch_free(patch.ptr)
+ patch.ptr = nil
return nil
}