summaryrefslogtreecommitdiff
path: root/pack-revindex.c
diff options
context:
space:
mode:
Diffstat (limited to 'pack-revindex.c')
-rw-r--r--pack-revindex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pack-revindex.c b/pack-revindex.c
index 0e4a31d9db..70d0fbafcb 100644
--- a/pack-revindex.c
+++ b/pack-revindex.c
@@ -296,14 +296,14 @@ int load_pack_revindex(struct packed_git *p)
int load_midx_revindex(struct multi_pack_index *m)
{
- char *revindex_name;
+ struct strbuf revindex_name = STRBUF_INIT;
int ret;
if (m->revindex_data)
return 0;
- revindex_name = get_midx_rev_filename(m);
+ get_midx_rev_filename(&revindex_name, m);
- ret = load_revindex_from_disk(revindex_name,
+ ret = load_revindex_from_disk(revindex_name.buf,
m->num_objects,
&m->revindex_map,
&m->revindex_len);
@@ -313,7 +313,7 @@ int load_midx_revindex(struct multi_pack_index *m)
m->revindex_data = (const uint32_t *)((const char *)m->revindex_map + RIDX_HEADER_SIZE);
cleanup:
- free(revindex_name);
+ strbuf_release(&revindex_name);
return ret;
}