diff options
| author | Carlos Martín Nieto <[email protected]> | 2019-01-15 20:28:36 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2019-01-15 20:28:36 +0100 |
| commit | f4ea2a561da9868efc670467061129ac6e53825d (patch) | |
| tree | 08e3295830eb4801e78bc00e56cb1bc1c0181929 | |
| parent | a2c93a0bcf63c88f9324333f7f3f6a204a817617 (diff) | |
Keep odb alive when adding mempack
| -rw-r--r-- | mempack.go | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -34,6 +34,7 @@ func NewMempack(odb *Odb) (mempack *Mempack, err error) { } ret = C.git_odb_add_backend(odb.ptr, mempack.ptr, C.int(999)) + runtime.KeepAlive(odb) if ret < 0 { // Since git_odb_add_alternate() takes ownership of the ODB backend, the // only case in which we free the mempack's memory is if it fails to be |
