]> git.ipfire.org Git - thirdparty/git.git/blobdiff - midx.c
pack-objects: free packing_data in more places
[thirdparty/git.git] / midx.c
diff --git a/midx.c b/midx.c
index 1d14661dade4a686b1b18c351c55275b2a388ee3..778dd536c8d087e5f62c8433690bf9dfe2dd014c 100644 (file)
--- a/midx.c
+++ b/midx.c
@@ -1603,8 +1603,13 @@ static int write_midx_internal(const char *object_dir,
                                      flags) < 0) {
                        error(_("could not write multi-pack bitmap"));
                        result = 1;
+                       clear_packing_data(&pdata);
+                       free(commits);
                        goto cleanup;
                }
+
+               clear_packing_data(&pdata);
+               free(commits);
        }
        /*
         * NOTE: Do not use ctx.entries beyond this point, since it might