Merge pull request #9500 from ThomasWaldmann/hashindex-memleak-1.1
Some checks are pending
CI / lint (push) Waiting to run
CI / pytest (macos-11, 3.7, py37) (push) Blocked by required conditions
CI / pytest (ubuntu-20.04, 3.10, py310) (push) Blocked by required conditions
CI / pytest (ubuntu-20.04, 3.5, py35) (push) Blocked by required conditions
CI / pytest (ubuntu-20.04, 3.6, py36) (push) Blocked by required conditions
CI / pytest (ubuntu-20.04, 3.7, py37) (push) Blocked by required conditions
CI / pytest (ubuntu-20.04, 3.8, py38) (push) Blocked by required conditions
CI / pytest (ubuntu-20.04, 3.9, py39) (push) Blocked by required conditions

hashindex: fix memory leak, fixes #9497
This commit is contained in:
TW 2026-03-18 18:57:04 +01:00 committed by GitHub
commit 951e5849f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -107,11 +107,13 @@ hashindex_free_buckets(HashIndex *index)
#ifndef BORG_NO_PYTHON
if(index->buckets_buffer.buf) {
PyBuffer_Release(&index->buckets_buffer);
index->buckets_buffer.buf = NULL;
} else
#endif
{
free(index->buckets);
}
index->buckets = NULL;
}
static int