packfile: close multi-pack-index in close_all_packs
[gitweb.git] / packfile.c
index 841b36182fcd938da5ee0a4b065e0717ef4a18ed..37fcd8f1363df48e66848490e5c3423bd833be51 100644 (file)
@@ -339,6 +339,11 @@ void close_all_packs(struct raw_object_store *o)
                        BUG("want to close pack marked 'do-not-close'");
                else
                        close_pack(p);
+
+       if (o->multi_pack_index) {
+               close_midx(o->multi_pack_index);
+               o->multi_pack_index = NULL;
+       }
 }
 
 /*