Merge branch 'jk/unleak-fixes'
Fix some incorrect UNLEAK() annotations. * jk/unleak-fixes: ls-remote: simplify UNLEAK() usage stop calling UNLEAK() before die()
This commit is contained in:
8
midx.c
8
midx.c
@ -821,11 +821,9 @@ static int write_midx_internal(const char *object_dir, struct multi_pack_index *
|
||||
int result = 0;
|
||||
|
||||
midx_name = get_midx_filename(object_dir);
|
||||
if (safe_create_leading_directories(midx_name)) {
|
||||
UNLEAK(midx_name);
|
||||
if (safe_create_leading_directories(midx_name))
|
||||
die_errno(_("unable to create leading directories of %s"),
|
||||
midx_name);
|
||||
}
|
||||
|
||||
if (m)
|
||||
packs.m = m;
|
||||
@ -1065,10 +1063,8 @@ void clear_midx_file(struct repository *r)
|
||||
r->objects->multi_pack_index = NULL;
|
||||
}
|
||||
|
||||
if (remove_path(midx)) {
|
||||
UNLEAK(midx);
|
||||
if (remove_path(midx))
|
||||
die(_("failed to clear multi-pack-index at %s"), midx);
|
||||
}
|
||||
|
||||
free(midx);
|
||||
}
|
||||
|
Reference in New Issue
Block a user