mirror of
https://github.com/git/git.git
synced 2026-03-04 14:37:35 +01:00
Merge branch 'sc/pack-redundant-leakfix' into next
Leakfix. * sc/pack-redundant-leakfix: pack-redundant: fix memory leak when open_pack_index() fails
This commit is contained in:
@@ -546,8 +546,10 @@ static struct pack_list * add_pack(struct packed_git *p)
|
||||
l.pack = p;
|
||||
llist_init(&l.remaining_objects);
|
||||
|
||||
if (open_pack_index(p))
|
||||
if (open_pack_index(p)) {
|
||||
llist_free(l.remaining_objects);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
base = p->index_data;
|
||||
base += 256 * 4 + ((p->index_version < 2) ? 4 : 8);
|
||||
|
||||
Reference in New Issue
Block a user