Skip to content

Commit d335e60

Browse files
committed
SQUASH???
1 parent bc3e998 commit d335e60

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

repack-promisor.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ static void copy_promisor_content(struct repository *repo,
6565
dest_idx_name = mkpathdup("%s-%s.idx", packtmp, dest_hex);
6666
get_oid_hex_algop(dest_hex, &dest_oid, repo->hash_algo);
6767
dest_pack = parse_pack_index(repo, dest_oid.hash, dest_idx_name);
68+
if (!dest_pack)
69+
BUG("parse_pack_index() failed.");
6870

6971
/* Open the .promisor dest file, and fill dest_content with its content */
7072
dest_promisor_name = mkpathdup("%s-%s.promisor", packtmp, dest_hex);
@@ -143,6 +145,7 @@ static void copy_promisor_content(struct repository *repo,
143145
die(_("Could not write '%s' promisor file"), dest_promisor_name);
144146

145147
close_pack_index(dest_pack);
148+
free(dest_pack);
146149
free(dest_idx_name);
147150
free(dest_promisor_name);
148151
strset_clear(&dest_content);

0 commit comments

Comments
 (0)